This just in from the “Wow, I can’t believe how easy this is” update desk: You can roll your own mocks “dynamically”, even when mocking an interface. No, this isn’t too good to be true. No that weird tingling isn’t from your bullsh@# meter going off. (But you really should get that tingling checked by [...]
Tag Archives: Expression
Combine Lambda Expressions: The And and the Or
Found this post here but wanted to make a really simple example to demonstrate this. The idea is simple, take something like this: currentItem => currentItem.BooleanMethodOne() && currentItem.BooleanMethodTwo() but say you only want to have one clause or both. Well you could make three separate expressions, but what if you wanted to add even more [...]
I’m starting to worry about myself
So the “dynamic” linq query so far isn’t just enough to stop. Oh no, now that I can have methods pass back expressions, what about a dictionary of order by expressions to allow an even more dynamic feel? Huh? How’s about that kids? I hate myself too. //Enum created for the dictionary key public enum [...]