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; } }
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; } }