public FieldGetter(FieldInfo fieldInfo) { _fieldInfo = fieldInfo; Name = fieldInfo.Name; MemberType = fieldInfo.FieldType; _lateBoundFieldGet = LazyFactory.Create(() => DelegateFactory.CreateGet(fieldInfo)); }
public MethodGetter(MethodInfo methodInfo) { _methodInfo = methodInfo; Name = _methodInfo.Name; _memberType = _methodInfo.ReturnType; _lateBoundMethod = LazyFactory.Create(() => DelegateFactory.CreateGet(methodInfo)); }
public PropertyAccessor(PropertyInfo propertyInfo) : base(propertyInfo) { HasSetter = propertyInfo.GetSetMethod(true) != null; if (HasSetter) { _lateBoundPropertySet = LazyFactory.Create(() => DelegateFactory.CreateSet(propertyInfo)); } }
public PropertyGetter(PropertyInfo propertyInfo) { _propertyInfo = propertyInfo; Name = _propertyInfo.Name; MemberType = _propertyInfo.PropertyType; _lateBoundPropertyGet = _propertyInfo.GetGetMethod(true) != null ? LazyFactory.Create(() => DelegateFactory.CreateGet(propertyInfo)) : LazyFactory.Create <LateBoundPropertyGet>(() => src => null); }
public FieldAccessor(FieldInfo fieldInfo) : base(fieldInfo) { _lateBoundFieldSet = LazyFactory.Create(() => DelegateFactory.CreateSet(fieldInfo)); }