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