예제 #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 PropertyAccessor(PropertyInfo propertyInfo)
     : base(propertyInfo)
 {
     HasSetter = propertyInfo.GetSetMethod(true) != null;
     if (HasSetter)
     {
         _lateBoundPropertySet = LazyFactory.Create(() => DelegateFactory.CreateSet(propertyInfo));
     }
 }
예제 #4
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);
 }
예제 #5
0
 public FieldAccessor(FieldInfo fieldInfo)
     : base(fieldInfo)
 {
     _lateBoundFieldSet = LazyFactory.Create(() => DelegateFactory.CreateSet(fieldInfo));
 }