Exemple #1
0
 public FieldGetter(FieldInfo fieldInfo)
 {
     _fieldInfo         = fieldInfo;
     Name               = fieldInfo.Name;
     MemberType         = fieldInfo.FieldType;
     _lateBoundFieldGet = LazyFactory.Create(() => DelegateFactory.CreateGet(fieldInfo));
 }
Exemple #2
0
 public MethodGetter(MethodInfo methodInfo)
 {
     _methodInfo      = methodInfo;
     Name             = _methodInfo.Name;
     _memberType      = _methodInfo.ReturnType;
     _lateBoundMethod = LazyFactory.Create(() => DelegateFactory.CreateGet(methodInfo));
 }
Exemple #3
0
 public PropertyAccessor(PropertyInfo propertyInfo)
     : base(propertyInfo)
 {
     HasSetter = propertyInfo.GetSetMethod(true) != null;
     if (HasSetter)
     {
         _lateBoundPropertySet = LazyFactory.Create(() => DelegateFactory.CreateSet(propertyInfo));
     }
 }
Exemple #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);
 }
Exemple #5
0
 public FieldAccessor(FieldInfo fieldInfo)
     : base(fieldInfo)
 {
     _lateBoundFieldSet = LazyFactory.Create(() => DelegateFactory.CreateSet(fieldInfo));
 }