public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
 {
     FieldAccessor fieldAccessor = this.fieldAccessor;
     if (fieldAccessor == null)
     {
         this.fieldAccessor = fieldAccessor = FieldAccessor.GetAccessorFor(this.field);
     }
     fieldAccessor.SetValue(obj, value);
 }
 public override object GetValue(object obj)
 {
     FieldAccessor fieldAccessor = this.fieldAccessor;
     if (fieldAccessor == null)
     {
         this.fieldAccessor = fieldAccessor = FieldAccessor.GetAccessorFor(TypeReferences.ToExecutionContext(this.field));
     }
     return fieldAccessor.GetValue(obj);
 }
        public override Object GetValue(Object obj)
        {
            FieldAccessor accessor = this.fieldAccessor;

            if (accessor == null)
            {
                this.fieldAccessor = accessor = FieldAccessor.GetAccessorFor(TypeReferences.ToExecutionContext(this.field));
            }
            return(accessor.GetValue(obj));
        }
Ejemplo n.º 4
0
        public override Object GetValue(Object obj)
        {
            FieldAccessor accessor = this.fieldAccessor;

            if (accessor == null)
            {
                this.fieldAccessor = accessor = FieldAccessor.GetAccessorFor(this.field);
            }
            return(accessor.GetValue(obj));
        }
        public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
        {
            FieldAccessor fieldAccessor = this.fieldAccessor;

            if (fieldAccessor == null)
            {
                this.fieldAccessor = fieldAccessor = FieldAccessor.GetAccessorFor(this.field);
            }
            fieldAccessor.SetValue(obj, value);
        }
        public override void SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
        {
            Debug.PreCondition(binder == null && culture == null);
            FieldAccessor accessor = this.fieldAccessor;

            if (accessor == null)
            {
                this.fieldAccessor = accessor = FieldAccessor.GetAccessorFor(this.field);
            }
            accessor.SetValue(obj, value);
        }
Ejemplo n.º 7
0
        internal static FieldAccessor GetAccessorFor(FieldInfo field)
        {
            FieldAccessor accessor = accessorFor[field] as FieldAccessor;

            if (accessor == null)
            {
                lock (accessorFor)
                {
                    accessor = accessorFor[field] as FieldAccessor;
                    if (accessor != null)
                    {
                        return(accessor);
                    }
                    accessor           = SpitAndInstantiateClassFor(field);
                    accessorFor[field] = accessor;
                }
            }
            return(accessor);
        }
Ejemplo n.º 8
0
 public override Object GetValue(Object obj){
   FieldAccessor accessor = this.fieldAccessor;
   if (accessor == null)
     this.fieldAccessor = accessor = FieldAccessor.GetAccessorFor(TypeReferences.ToExecutionContext(this.field));
   return accessor.GetValue(obj);
 }
Ejemplo n.º 9
0
 public override void SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture){
   Debug.PreCondition(binder == null && culture == null);
   FieldAccessor accessor = this.fieldAccessor;
   if (accessor == null)
     this.fieldAccessor = accessor = FieldAccessor.GetAccessorFor(this.field);
   accessor.SetValue(obj, value);
 }
Ejemplo n.º 10
0
 public override Object GetValue(Object obj){
   FieldAccessor accessor = this.fieldAccessor;
   if (accessor == null)
     this.fieldAccessor = accessor = FieldAccessor.GetAccessorFor(this.field);
   return accessor.GetValue(obj);
 }