Contents tagged with Reflection
-
Using Generated Methods Instead of Reflection
It is a common thing to say that reflection is slow.You will find tons of posts saying this, and I generally tend to agree to them, although in most cases we generally don’t need to care that much – in fact, so many libraries and frameworks that we rely on daily depend on it!
-
Performance in .NET – Part 1
Updated: thanks, Paulo Morgado!
-
Interception in .NET – Part 3: Static Interception
Updated: see the final post in the series here.
-
Detecting Default Values of Value Types
I don’t know if this happened to you: the need to find out if some instance of a class is the class’ default value. For reference types – which include nullables -, it is always null, and for value types, it is the value that you get if you do not initialize a field of that type or if you call its default parameterless constructor – false for Boolean, 0 for numbers, the 0 member of an enumeration, etc. So, the problem is, how can we tell if some instance represents this default value, dynamically, that is, for any value type, not just a specific one.
-
Mapping Non-Public Members With Entity Framework Code First
This is a common request, and really makes sense; we need to use LINQ expressions and a bit of reflection magic. First, an helper function for returning an expression that points to a member:
-
NDepend 4 – First Steps
Thanks to Patrick Smacchia I had the chance to test NDepend 4. I can only say: awesome!
-
Dynamic LINQ Methods
Continuing the Dynamic LINQ series, here are some hopefuly useful methods for performing LINQ queries in IQueryable or IQueryable<T> object, with String parameters. The available methods, so far, are:
-
Enhanced Dynamic LINQ Filtering
-
Dynamic Filtering
Continuing my previous posts on dynamic LINQ, now it's time for dynamic filtering. For now, I'll focus on string matching.
-
Dynamic LINQ in an Assembly Near By