Calling the "GetMethods" method for each invocation

Dec 23, 2009 at 4:18 PM

Hi,

I strated going over the code for the ExceptionHandlingProxyBase<T> calss and there is something that i don't fully understand.

In all the invocation methods you call the follwoing method :  "internal MethodInfo GetMethod(string operationName)" at the start of the methods.

This method prepares a collection that holds all the methods names that the T (usually an interface) implements.

what i dont undestand is , why do you call the "GetMethods" for each invocation ? can't you create this HashSet<T> collection in the constructor or at the initilization of the class and then reuse for each invocation ?

am i missing somthing ?

thanks for you help !!! :-)