Miscellaneous Debris

Avner Kashtan's Frustrations and Exultations

Browse by Tags

All Tags » Reflection (RSS)
Reflecting over an Event
A coworker (Hey, Evgeny!) came to me with a puzzler today. He has an object that exposes an event, and he wants to know whether he's already subscribed to that event. Two things immediately came to mind - the first was that he really shouldn't...

Posted Thursday, March 29, 2007 5:03 PM by Avner Kashtan | 4 comment(s)

Filed under: , , ,

Crossing the line - Reflection and Reality
When we're working Reflection, we tend to think in different terms than we do when we're actually calling methods. There's an extra level of abstraction in everything we do. Translating between these levels of abstraction isn't always easy or intuitive...

Posted Tuesday, December 12, 2006 8:42 PM by Avner Kashtan | 1 comment(s)

Filed under: , ,

Aggregated Interface Implementation
I've been struggling around the aggregation used in WCF's Binding object model, as implemented in the GetProperty<T> method (see relevant discussions with Nicholas Allen from the WCF team here and here ), and I'm struck by how the need...

Posted Tuesday, August 08, 2006 9:01 AM by AvnerK | 4 comment(s)

Filed under: , , , ,

From Accessors to Properties
For various debugging processes, I find myself needing to find several bits of runtime information for my properties. This means I want to get the property's PropertyInfo object by Reflection when that property's code is running. The problem is that Properties...

Posted Wednesday, May 31, 2006 3:02 PM by AvnerK | 5 comment(s)

Filed under: ,

Non-generic default values in C#? Why not?!
A relatively obscure new keyword in C# 2.0 is the default(T) keyword. It's shorthand for checking if the given generic parameter T is a value type or reference type. If it's a reference type, it returns null. Otherwise it returns 0/false/0.0 or whatever...

Posted Sunday, May 21, 2006 11:58 AM by AvnerK | 16 comment(s)

Filed under: , , ,

System.Reflection.Omit
In TechEd Israel 2006, I listened to Roy Osherove 's excellent talk on the new reflection features in .NET 2.0 - a great assortment of topics on things ranging from DynamicMethods to the ReflectionOnly- set of properties. One of the things he mentioned...

Posted Monday, May 15, 2006 9:45 AM by AvnerK | with no comments

Filed under: ,

More Posts