コード例 #1
0
ファイル: RuntimeFieldInfo.cs プロジェクト: noahfalk/corert
        public sealed override void SetValue(Object obj, Object value)
        {
            if (ReflectionTrace.Enabled)
            {
                ReflectionTrace.FieldInfo_SetValue(this, obj, value);
            }

            FieldAccessor fieldAccessor = this.FieldAccessor;

            fieldAccessor.SetField(obj, value);
        }
コード例 #2
0
        public sealed override void SetValue(Object obj, Object value)
        {
#if ENABLE_REFLECTION_TRACE
            if (ReflectionTrace.Enabled)
            {
                ReflectionTrace.FieldInfo_SetValue(this, obj, value);
            }
#endif

            FieldAccessor fieldAccessor = this.FieldAccessor;
            fieldAccessor.SetField(obj, value);
        }
コード例 #3
0
ファイル: RuntimeFieldInfo.cs プロジェクト: weshaggard/corert
        public sealed override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
        {
#if ENABLE_REFLECTION_TRACE
            if (ReflectionTrace.Enabled)
            {
                ReflectionTrace.FieldInfo_SetValue(this, obj, value);
            }
#endif

            FieldAccessor fieldAccessor = this.FieldAccessor;
            BinderBundle  binderBundle  = binder.ToBinderBundle(invokeAttr, culture);
            fieldAccessor.SetField(obj, value, binderBundle);
        }
コード例 #4
0
        public sealed override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
        {
#if ENABLE_REFLECTION_TRACE
            if (ReflectionTrace.Enabled)
            {
                ReflectionTrace.FieldInfo_SetValue(this, obj, value);
            }
#endif

            binder.EnsureNotCustomBinder();

            FieldAccessor fieldAccessor = this.FieldAccessor;
            fieldAccessor.SetField(obj, value);
        }
コード例 #5
0
        public sealed override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
        {
#if ENABLE_REFLECTION_TRACE
            if (ReflectionTrace.Enabled)
            {
                ReflectionTrace.FieldInfo_SetValue(this, obj, value);
            }
#endif

            if (invokeAttr != BindingFlags.Default || !(binder is DefaultBinder) || culture != null)
            {
                throw new NotImplementedException();
            }

            FieldAccessor fieldAccessor = this.FieldAccessor;
            fieldAccessor.SetField(obj, value);
        }