Ejemplo n.º 1
0
 private void InitialiseGetter()
 {
     getterMethod = propertyInfo.GetGetMethod() ?? propertyInfo.GetGetMethod(true);
     try
     {
         fastGetter          = FastMethodReflection.FuncCaller0Params(getterMethod);
         preferredGetterCall = fastGetter != null
                                       ? CallTypes.ViaDelegate
                                       : CallTypes.ReflectedMethod;
     }
     catch (Exception)
     {
         preferredGetterCall = CallTypes.ReflectedMethod;
     }
 }
Ejemplo n.º 2
0
 private void InitialiseSetter()
 {
     setterMethod = propertyInfo.GetSetMethod() ?? propertyInfo.GetSetMethod(true);
     try
     {
         fastSetter          = FastMethodReflection.VoidCaller1Param(setterMethod);
         preferredSetterCall = fastSetter != null
                                       ? CallTypes.ViaDelegate
                                       : CallTypes.ReflectedMethod;
     }
     catch (Exception)
     {
         preferredSetterCall = CallTypes.ReflectedMethod;
     }
 }