Пример #1
0
 public FieldGetter(FieldInfo fieldInfo)
 {
     _fieldInfo         = fieldInfo;
     Name               = fieldInfo.Name;
     MemberType         = fieldInfo.FieldType;
     _lateBoundFieldGet = LazyFactory.Create(() => DelegateFactory.CreateGet(fieldInfo));
 }
Пример #2
0
 public MethodGetter(MethodInfo methodInfo)
 {
     _methodInfo      = methodInfo;
     Name             = _methodInfo.Name;
     _memberType      = _methodInfo.ReturnType;
     _lateBoundMethod = LazyFactory.Create(() => DelegateFactory.CreateGet(methodInfo));
 }
Пример #3
0
 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);
 }