예제 #1
0
        protected sealed override Object GetFieldBypassCctor(Object obj)
        {
            IntPtr tlsFieldsStartAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, IntPtr.Zero);
            IntPtr fieldAddress          = tlsFieldsStartAddress + _fieldOffset;

            return(RuntimeAugments.LoadReferenceTypeField(fieldAddress));
        }
예제 #2
0
        protected sealed override void SetFieldBypassCctor(Object obj, Object value)
        {
            value = RuntimeAugments.CheckArgument(value, FieldTypeHandle);
            IntPtr fieldAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, _cookie);

            RuntimeAugments.StoreValueTypeField(fieldAddress, value, FieldTypeHandle);
        }
        protected sealed override void UncheckedSetFieldBypassCctor(Object value)
        {
            IntPtr tlsFieldsStartAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, IntPtr.Zero);
            IntPtr fieldAddress          = tlsFieldsStartAddress + _fieldOffset;

            RuntimeAugments.StoreValueTypeField(fieldAddress, value, FieldTypeHandle);
        }
예제 #4
0
        protected sealed override void SetFieldBypassCctor(Object obj, Object value, BinderBundle binderBundle)
        {
            value = RuntimeAugments.CheckArgument(value, FieldTypeHandle, binderBundle);
            IntPtr tlsFieldsStartAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, IntPtr.Zero);
            IntPtr fieldAddress          = tlsFieldsStartAddress + _fieldOffset;

            RuntimeAugments.StoreReferenceTypeField(fieldAddress, value);
        }
        protected sealed override void UncheckedSetFieldBypassCctor(Object value)
        {
            IntPtr fieldAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, _threadStaticsBlockOffset, _fieldOffset);

            RuntimeAugments.StoreValueTypeField(fieldAddress, value, FieldTypeHandle);
        }
        protected sealed override Object GetFieldBypassCctor()
        {
            IntPtr fieldAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, _threadStaticsBlockOffset, _fieldOffset);

            return(RuntimeAugments.LoadValueTypeField(fieldAddress, FieldTypeHandle));
        }
예제 #7
0
        protected sealed override void UncheckedSetFieldBypassCctor(Object value)
        {
            IntPtr fieldAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, _cookie);

            RuntimeAugments.StoreReferenceTypeField(fieldAddress, value);
        }
예제 #8
0
        protected sealed override Object GetFieldBypassCctor()
        {
            IntPtr fieldAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, _cookie);

            return(RuntimeAugments.LoadReferenceTypeField(fieldAddress));
        }