Example #1
0
        internal RuntimePropertyInfo(
            int tkProperty,
            RuntimeType declaredType,
            RuntimeTypeCache reflectedTypeCache,
            out bool isPrivate
            )
        {
            Debug.Assert(declaredType != null);
            Debug.Assert(reflectedTypeCache != null);
            Debug.Assert(!reflectedTypeCache.IsGlobal);

            MetadataImport scope = declaredType.GetRuntimeModule().MetadataImport;

            m_token = tkProperty;
            m_reflectedTypeCache = reflectedTypeCache;
            m_declaringType      = declaredType;

            scope.GetPropertyProps(tkProperty, out m_utf8name, out m_flags, out _);

            Associates.AssignAssociates(
                scope,
                tkProperty,
                declaredType,
                reflectedTypeCache.GetRuntimeType(),
                out _,
                out _,
                out _,
                out m_getterMethod,
                out m_setterMethod,
                out m_otherMethod,
                out isPrivate,
                out m_bindingFlags
                );
        }
Example #2
0
 [System.Security.SecurityCritical]  // auto-generated
 internal RtFieldInfo(
     RuntimeFieldHandleInternal handle, RuntimeType declaringType, RuntimeTypeCache reflectedTypeCache, BindingFlags bindingFlags)
     : base(reflectedTypeCache, declaringType, bindingFlags)
 {
     m_fieldHandle     = handle.Value;
     m_fieldAttributes = RuntimeFieldHandle.GetAttributes(handle);
 }
 internal RuntimeConstructorInfo(
     RuntimeMethodHandleInternal handle, RuntimeType declaringType, RuntimeTypeCache reflectedTypeCache,
     MethodAttributes methodAttributes, BindingFlags bindingFlags)
 {
     m_bindingFlags       = bindingFlags;
     m_reflectedTypeCache = reflectedTypeCache;
     m_declaringType      = declaringType;
     m_handle             = handle.Value;
     m_methodAttributes   = methodAttributes;
 }
Example #4
0
 protected RuntimeFieldInfo(
     RuntimeTypeCache reflectedTypeCache,
     RuntimeType declaringType,
     BindingFlags bindingFlags
     )
 {
     m_bindingFlags       = bindingFlags;
     m_declaringType      = declaringType;
     m_reflectedTypeCache = reflectedTypeCache;
 }
Example #5
0
 internal MdFieldInfo(
     int tkField,
     FieldAttributes fieldAttributes,
     RuntimeTypeHandle declaringTypeHandle,
     RuntimeTypeCache reflectedTypeCache,
     BindingFlags bindingFlags
     ) : base(reflectedTypeCache, declaringTypeHandle.GetRuntimeType(), bindingFlags)
 {
     m_tkField         = tkField;
     m_name            = null;
     m_fieldAttributes = fieldAttributes;
 }
Example #6
0
        internal RuntimeMethodInfo(
            RuntimeMethodHandleInternal handle, RuntimeType declaringType,
            RuntimeTypeCache reflectedTypeCache, MethodAttributes methodAttributes, BindingFlags bindingFlags, object keepalive)
        {
            Debug.Assert(!handle.IsNullHandle());
            Debug.Assert(methodAttributes == RuntimeMethodHandle.GetAttributes(handle));

            m_bindingFlags       = bindingFlags;
            m_declaringType      = declaringType;
            m_keepalive          = keepalive;
            m_handle             = handle.Value;
            m_reflectedTypeCache = reflectedTypeCache;
            m_methodAttributes   = methodAttributes;
        }
Example #7
0
        internal RuntimeEventInfo(int tkEvent, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        {
            Debug.Assert(declaredType != null);
            Debug.Assert(reflectedTypeCache != null);
            Debug.Assert(!reflectedTypeCache.IsGlobal);

            MetadataImport scope = declaredType.GetRuntimeModule().MetadataImport;

            m_token = tkEvent;
            m_reflectedTypeCache = reflectedTypeCache;
            m_declaringType      = declaredType;


            RuntimeType reflectedType = reflectedTypeCache.GetRuntimeType();

            scope.GetEventProps(tkEvent, out m_utf8name, out m_flags);

            Associates.AssignAssociates(scope, tkEvent, declaredType, reflectedType,
                                        out m_addMethod, out m_removeMethod, out m_raiseMethod,
                                        out _, out _, out m_otherMethod, out isPrivate, out m_bindingFlags);
        }
Example #8
0
        [System.Security.SecurityCritical]  // auto-generated
        internal RuntimePropertyInfo(
            int tkProperty, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        {
            Contract.Requires(declaredType != null);
            Contract.Requires(reflectedTypeCache != null);
            Contract.Assert(!reflectedTypeCache.IsGlobal);

            MetadataImport scope = declaredType.GetRuntimeModule().MetadataImport;

            m_token = tkProperty;
            m_reflectedTypeCache = reflectedTypeCache;
            m_declaringType      = declaredType;

            ConstArray sig;

            scope.GetPropertyProps(tkProperty, out m_utf8name, out m_flags, out sig);

            RuntimeMethodInfo dummy;

            Associates.AssignAssociates(scope, tkProperty, declaredType, reflectedTypeCache.GetRuntimeType(),
                                        out dummy, out dummy, out dummy,
                                        out m_getterMethod, out m_setterMethod, out m_otherMethod,
                                        out isPrivate, out m_bindingFlags);
        }
Example #9
0
        internal RuntimeConstructorInfo(
            RuntimeMethodHandleInternal handle, RuntimeType declaringType, RuntimeTypeCache reflectedTypeCache,
            MethodAttributes methodAttributes, BindingFlags bindingFlags)
        {
            Contract.Ensures(methodAttributes == RuntimeMethodHandle.GetAttributes(handle));

            m_bindingFlags = bindingFlags;
            m_reflectedTypeCache = reflectedTypeCache;
            m_declaringType = declaringType;
            m_handle = handle.Value;
            m_methodAttributes = methodAttributes;
        }
Example #10
0
        [System.Security.SecurityCritical]  // auto-generated
        internal RuntimeEventInfo(int tkEvent, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        {
            Contract.Requires(declaredType != null);
            Contract.Requires(reflectedTypeCache != null);
            Contract.Assert(!reflectedTypeCache.IsGlobal);

            MetadataImport scope = declaredType.GetRuntimeModule().MetadataImport;

            m_token = tkEvent;
            m_reflectedTypeCache = reflectedTypeCache;        
            m_declaringType = declaredType;
            

            RuntimeType reflectedType = reflectedTypeCache.GetRuntimeType();

            scope.GetEventProps(tkEvent, out m_utf8name, out m_flags);

            RuntimeMethodInfo dummy;
            Associates.AssignAssociates(scope, tkEvent, declaredType, reflectedType, 
                out m_addMethod, out m_removeMethod, out m_raiseMethod, 
                out dummy, out dummy, out m_otherMethod, out isPrivate, out m_bindingFlags);
        }
        internal RuntimeEventInfo(int tkEvent, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        {
            ASSERT.PRECONDITION(declaredType != null);
            ASSERT.PRECONDITION(reflectedTypeCache != null);
            ASSERT.PRECONDITION(!reflectedTypeCache.IsGlobal);

            MetadataImport scope = declaredType.Module.MetadataImport;

            m_token = tkEvent;
            m_reflectedTypeCache = reflectedTypeCache;        
            m_declaringType = declaredType;
            

            RuntimeTypeHandle declaredTypeHandle = declaredType.GetTypeHandleInternal();
            RuntimeTypeHandle reflectedTypeHandle = reflectedTypeCache.RuntimeTypeHandle;
            RuntimeMethodInfo dummy;

            scope.GetEventProps(tkEvent, out m_utf8name, out m_flags);
            int cAssociateRecord = scope.GetAssociatesCount(tkEvent);
            AssociateRecord* associateRecord = stackalloc AssociateRecord[cAssociateRecord];
            scope.GetAssociates(tkEvent, associateRecord, cAssociateRecord);
            Associates.AssignAssociates(associateRecord, cAssociateRecord, declaredTypeHandle, reflectedTypeHandle, 
                out m_addMethod, out m_removeMethod, out m_raiseMethod, 
                out dummy, out dummy, out m_otherMethod, out isPrivate, out m_bindingFlags);
        }
Example #12
0
 internal MdFieldInfo(
 int tkField, FieldAttributes fieldAttributes, RuntimeTypeHandle declaringTypeHandle, RuntimeTypeCache reflectedTypeCache, BindingFlags bindingFlags)
     : base(reflectedTypeCache, declaringTypeHandle.GetRuntimeType(), bindingFlags)
 {
     m_tkField = tkField;
     m_name = null; 
     m_fieldAttributes = fieldAttributes;
 }
Example #13
0
 [System.Security.SecurityCritical]  // auto-generated
 internal RtFieldInfo(
     RuntimeFieldHandleInternal handle, RuntimeType declaringType, RuntimeTypeCache reflectedTypeCache, BindingFlags bindingFlags) 
     : base(reflectedTypeCache, declaringType, bindingFlags)
 {
     m_fieldHandle = handle.Value;
     m_fieldAttributes = RuntimeFieldHandle.GetAttributes(handle);
 }
Example #14
0
 protected RuntimeFieldInfo(RuntimeTypeCache reflectedTypeCache, RuntimeType declaringType, BindingFlags bindingFlags)
 {
     m_bindingFlags = bindingFlags;
     m_declaringType = declaringType;
     m_reflectedTypeCache = reflectedTypeCache;
 }
Example #15
0
        [System.Security.SecurityCritical]  // auto-generated 
        internal RuntimePropertyInfo( 
            int tkProperty, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        { 
            Contract.Requires(declaredType != null);
            Contract.Requires(reflectedTypeCache != null);
            Contract.Assert(!reflectedTypeCache.IsGlobal);
 
            MetadataImport scope = declaredType.GetRuntimeModule().MetadataImport;
 
            m_token = tkProperty; 
            m_reflectedTypeCache = reflectedTypeCache;
            m_declaringType = declaredType; 

            RuntimeMethodInfo dummy;

            scope.GetPropertyProps(tkProperty, out m_utf8name, out m_flags, out MetadataArgs.Skip.ConstArray); 
            int cAssociateRecord = scope.GetAssociatesCount(tkProperty);
            AssociateRecord* associateRecord = stackalloc AssociateRecord[cAssociateRecord]; 
            scope.GetAssociates(tkProperty, associateRecord, cAssociateRecord); 
            Associates.AssignAssociates(associateRecord, cAssociateRecord, declaredType, reflectedTypeCache.RuntimeType,
                out dummy, out dummy, out dummy, 
                out m_getterMethod, out m_setterMethod, out m_otherMethod,
                out isPrivate, out m_bindingFlags);
        }
Example #16
0
        [System.Security.SecurityCritical]  // auto-generated
        internal RuntimePropertyInfo(
            int tkProperty, RuntimeType declaredType, RuntimeTypeCache reflectedTypeCache, out bool isPrivate)
        {
            Contract.Requires(declaredType != null);
            Contract.Requires(reflectedTypeCache != null);
            Contract.Assert(!reflectedTypeCache.IsGlobal);

            MetadataImport scope = declaredType.GetRuntimeModule().MetadataImport;

            m_token = tkProperty;
            m_reflectedTypeCache = reflectedTypeCache;    
            m_declaringType = declaredType;

            ConstArray sig;
            scope.GetPropertyProps(tkProperty, out m_utf8name, out m_flags, out sig);

            RuntimeMethodInfo dummy;
            Associates.AssignAssociates(scope, tkProperty, declaredType, reflectedTypeCache.GetRuntimeType(), 
                out dummy, out dummy, out dummy,
                out m_getterMethod, out m_setterMethod, out m_otherMethod,
                out isPrivate, out m_bindingFlags);
        }
Example #17
0
        internal RuntimeMethodInfo(
            RuntimeMethodHandleInternal handle, RuntimeType declaringType, 
            RuntimeTypeCache reflectedTypeCache, MethodAttributes methodAttributes, BindingFlags bindingFlags, object keepalive)
        {
            Contract.Ensures(!m_handle.IsNull());

            Debug.Assert(!handle.IsNullHandle());
            Debug.Assert(methodAttributes == RuntimeMethodHandle.GetAttributes(handle));            

            m_bindingFlags = bindingFlags;
            m_declaringType = declaringType;
            m_keepalive = keepalive;
            m_handle = handle.Value;
            m_reflectedTypeCache = reflectedTypeCache;
            m_methodAttributes = methodAttributes;
        }
        internal RuntimeConstructorInfo(
            RuntimeMethodHandle handle, RuntimeTypeHandle declaringTypeHandle, RuntimeTypeCache reflectedTypeCache,
            MethodAttributes methodAttributes, BindingFlags bindingFlags)
        {
            ASSERT.POSTCONDITION(methodAttributes == handle.GetAttributes());

            m_bindingFlags = bindingFlags;
            m_handle = handle;
            m_reflectedTypeCache = reflectedTypeCache;
            m_declaringType = declaringTypeHandle.GetRuntimeType();
            m_parameters = null; // Created lazily when GetParameters() is called.
            m_toString = null;
            m_methodAttributes = methodAttributes;
        }