Пример #1
0
 public PropertyInfoItemASM(IPropertyInfo property, bool allowNullEquivalentValue)
     : base(property, allowNullEquivalentValue)
 {
     if (property.IsReadable)
     {
         getDelegate = TypeUtility.GetMemberGetDelegate(property.DeclaringType, property.Name);
     }
     if (property.IsWritable)
     {
         setDelegate = TypeUtility.GetMemberSetDelegate(property.DeclaringType, property.Name);
     }
 }
Пример #2
0
 public MethodPropertyInfoASM(Type entityType, String propertyName, MethodInfo getter, MethodInfo setter)
     : base(entityType, propertyName, getter, setter)
 {
     if (Getter != null)
     {
         getDelegate = TypeUtility.GetMemberGetDelegate(getter.DeclaringType, getter.Name);
     }
     if (Getter != null)
     {
         setDelegate = TypeUtility.GetMemberSetDelegate(setter.DeclaringType, setter.Name);
     }
     IsReadable = getDelegate != null;
     IsWritable = setDelegate != null;
 }
Пример #3
0
 public override void RefreshAccessors(Type realType)
 {
     base.RefreshAccessors(realType);
     if (Getter != null)
     {
         getDelegate = TypeUtility.GetMemberGetDelegate(Getter.DeclaringType, Getter.Name);
     }
     if (Getter != null)
     {
         setDelegate = TypeUtility.GetMemberSetDelegate(Getter.DeclaringType, Setter.Name);
     }
     IsReadable = getDelegate != null;
     IsWritable = setDelegate != null;
 }
Пример #4
0
 public FieldPropertyInfoASM(Type entityType, String propertyName, FieldInfo field)
     : base(entityType, propertyName, field)
 {
     getDelegate = TypeUtility.GetMemberGetDelegate(field.DeclaringType, field.Name);
     setDelegate = TypeUtility.GetMemberSetDelegate(field.DeclaringType, field.Name);
 }
Пример #5
0
 public FieldInfoItemASM(FieldInfo field, bool allowNullEquivalentValue, String propertyName)
     : base(field, allowNullEquivalentValue, propertyName)
 {
     getDelegate = TypeUtility.GetMemberGetDelegate(field.DeclaringType, field.Name);
     setDelegate = TypeUtility.GetMemberSetDelegate(field.DeclaringType, field.Name);
 }