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

            return(RuntimeAugments.LoadReferenceTypeField(fieldAddress));
        }
Example #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);
        }
Example #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));
        }
Example #7
0
        protected sealed override void UncheckedSetFieldBypassCctor(Object value)
        {
            IntPtr fieldAddress = RuntimeAugments.GetThreadStaticFieldAddress(_declaringTypeHandle, _cookie);

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

            return(RuntimeAugments.LoadReferenceTypeField(fieldAddress));
        }