internal static ConstructorInfo GetConstructor(
     ConstructorInfo Constructor,
     TypeBuilderInstantiation type
     )
 {
     return(new ConstructorOnTypeBuilderInstantiation(Constructor, type));
 }
        internal MethodOnTypeBuilderInstantiation(MethodInfo method, TypeBuilderInstantiation type)
        {
            Debug.Assert(method is MethodBuilder || method is RuntimeMethodInfo);

            m_method = method;
            m_type   = type;
        }
        internal FieldOnTypeBuilderInstantiation(FieldInfo field, TypeBuilderInstantiation type)
        {
            Debug.Assert(field is FieldBuilder || field is RuntimeFieldInfo);

            m_field = field;
            m_type  = type;
        }
        internal static FieldInfo GetField(FieldInfo Field, TypeBuilderInstantiation type)
        {
            FieldInfo?m = null;

            // This ifdef was introduced when non-generic collections were pulled from
            // silverlight. See code:Dictionary#DictionaryVersusHashtableThreadSafety
            // for information about this change.
            //
            // There is a pre-existing race condition in this code with the side effect
            // that the second thread's value clobbers the first in the hashtable. This is
            // an acceptable race condition since we make no guarantees that this will return the
            // same object.
            //
            // We're not entirely sure if this cache helps any specific scenarios, so
            // long-term, one could investigate whether it's needed. In any case, this
            // method isn't expected to be on any critical paths for performance.
            if (type.m_hashtable.Contains(Field))
            {
                m = (type.m_hashtable[Field] as FieldInfo) !;
            }
            else
            {
                m = new FieldOnTypeBuilderInstantiation(Field, type);
                type.m_hashtable[Field] = m;
            }

            return(m);
        }
        internal MethodOnTypeBuilderInstantiation(MethodInfo method, TypeBuilderInstantiation type)
        {
            Debug.Assert(method is MethodBuilder || method is RuntimeMethodInfo);

            m_method = method;
            m_type = type;
        }
        internal ConstructorOnTypeBuilderInstantiation(ConstructorInfo constructor, TypeBuilderInstantiation type)
        {
            Debug.Assert(constructor is ConstructorBuilder || constructor is RuntimeConstructorInfo);

            m_ctor = constructor;
            m_type = type;
        }
 internal static System.Reflection.FieldInfo GetField(System.Reflection.FieldInfo Field, TypeBuilderInstantiation type)
 {
     System.Reflection.FieldInfo info = null;
     if (type.m_hashtable.Contains(Field))
     {
         return (type.m_hashtable[Field] as System.Reflection.FieldInfo);
     }
     info = new FieldOnTypeBuilderInstantiation(Field, type);
     type.m_hashtable[Field] = info;
     return info;
 }
Пример #8
0
        internal static FieldInfo GetField(FieldInfo Field, TypeBuilderInstantiation type)
        {
            Entry entry = new Entry(Field, type);

            if (m_hashtable.Contains(entry))
            {
                return(m_hashtable[entry] as FieldInfo);
            }

            FieldInfo m = new FieldOnTypeBuilderInstantiation(Field, type);

            m_hashtable[entry] = m;
            return(m);
        }
Пример #9
0
        // Token: 0x06004DD4 RID: 19924 RVA: 0x001174F8 File Offset: 0x001156F8
        internal static FieldInfo GetField(FieldInfo Field, TypeBuilderInstantiation type)
        {
            FieldInfo fieldInfo;

            if (type.m_hashtable.Contains(Field))
            {
                fieldInfo = (type.m_hashtable[Field] as FieldInfo);
            }
            else
            {
                fieldInfo = new FieldOnTypeBuilderInstantiation(Field, type);
                type.m_hashtable[Field] = fieldInfo;
            }
            return(fieldInfo);
        }
 internal FieldOnTypeBuilderInstantiation(System.Reflection.FieldInfo field, TypeBuilderInstantiation type)
 {
     this.m_field = field;
     this.m_type  = type;
 }
Пример #11
0
		public FieldOnTypeBuilderInst (TypeBuilderInstantiation instantiation, FieldInfo fb) {
			this.instantiation = instantiation;
			this.fb = fb;
		}
Пример #12
0
 // Token: 0x06004DD5 RID: 19925 RVA: 0x0011753F File Offset: 0x0011573F
 internal FieldOnTypeBuilderInstantiation(FieldInfo field, TypeBuilderInstantiation type)
 {
     this.m_field = field;
     this.m_type  = type;
 }
Пример #13
0
		internal EventOnTypeBuilderInst (TypeBuilderInstantiation instantiation, EventBuilder evt)
		{
			this.instantiation = instantiation;
			this.event_builder = evt;
		}
		public ConstructorOnTypeBuilderInst (TypeBuilderInstantiation instantiation, ConstructorInfo cb)
		{
			this.instantiation = instantiation;
			this.cb = cb;
		}
        internal FieldOnTypeBuilderInstantiation(FieldInfo field, TypeBuilderInstantiation type)
        {
            Debug.Assert(field is FieldBuilder || field is RuntimeFieldInfo);

            m_field = field;
            m_type = type;
        }
Пример #16
0
 public Entry(FieldInfo Field, TypeBuilderInstantiation type)
 {
     m_field = Field; m_type = type;
 }
 internal static ConstructorInfo GetConstructor(ConstructorInfo Constructor, TypeBuilderInstantiation type)
 {
     return new ConstructorOnTypeBuilderInstantiation(Constructor, type);
 }
 internal static MethodInfo GetMethod(MethodInfo method, TypeBuilderInstantiation type)
 {
     return new MethodOnTypeBuilderInstantiation(method, type);
 }
 internal MethodOnTypeBuilderInstantiation(MethodInfo method, TypeBuilderInstantiation type)
 {
     m_method = method;
     m_type = type;
 }
 internal FieldOnTypeBuilderInstantiation(FieldInfo field, TypeBuilderInstantiation type) { m_field = field; m_type = type; }       
        internal static FieldInfo GetField(FieldInfo Field, TypeBuilderInstantiation type)
        {
            Entry entry = new Entry(Field, type);

            if (m_hashtable.Contains(entry))
                return m_hashtable[entry] as FieldInfo;

            FieldInfo m = new FieldOnTypeBuilderInstantiation(Field, type);

            m_hashtable[entry] = m;
            return m;
        }
 public Entry(FieldInfo Field, TypeBuilderInstantiation type) { m_field = Field; m_type = type; }
 internal ConstructorOnTypeBuilderInstantiation(ConstructorInfo constructor, TypeBuilderInstantiation type)
 {
     m_ctor = constructor;
     m_type = type;
 }
        internal ConstructorOnTypeBuilderInstantiation(ConstructorInfo constructor, TypeBuilderInstantiation type)
        {
            Debug.Assert(constructor is ConstructorBuilder || constructor is RuntimeConstructorInfo);

            m_ctor = constructor;
            m_type = type;
        }
 internal static System.Reflection.FieldInfo GetField(System.Reflection.FieldInfo Field, TypeBuilderInstantiation type)
 {
     System.Reflection.FieldInfo info = null;
     if (type.m_hashtable.Contains(Field))
     {
         return(type.m_hashtable[Field] as System.Reflection.FieldInfo);
     }
     info = new FieldOnTypeBuilderInstantiation(Field, type);
     type.m_hashtable[Field] = info;
     return(info);
 }
        internal static FieldInfo GetField(FieldInfo Field, TypeBuilderInstantiation type)
        {
            FieldInfo m = null;

            // This ifdef was introduced when non-generic collections were pulled from
            // silverlight. See code:Dictionary#DictionaryVersusHashtableThreadSafety
            // for information about this change.
            //
            // There is a pre-existing race condition in this code with the side effect
            // that the second thread's value clobbers the first in the hashtable. This is 
            // an acceptable race condition since we make no guarantees that this will return the
            // same object.
            //
            // We're not entirely sure if this cache helps any specific scenarios, so 
            // long-term, one could investigate whether it's needed. In any case, this
            // method isn't expected to be on any critical paths for performance.
            if (type.m_hashtable.Contains(Field)) {
                m = type.m_hashtable[Field] as FieldInfo;
            }
            else {
                m = new FieldOnTypeBuilderInstantiation(Field, type);
                type.m_hashtable[Field] = m;
            }

            return m;
        }
 public ConstructorOnTypeBuilderInst(TypeBuilderInstantiation instantiation, ConstructorInfo cb)
 {
     this.instantiation = instantiation;
     this.cb            = cb;
 }
Пример #28
0
 internal EventOnTypeBuilderInst(TypeBuilderInstantiation instantiation, EventBuilder evt)
 {
     this.instantiation = instantiation;
     this.event_builder = evt;
 }
Пример #29
0
		internal EventOnTypeBuilderInst (TypeBuilderInstantiation instantiation, EventInfo evt)
		{
			this.instantiation = instantiation;
			this.event_info = evt;
		}
 internal static MethodInfo GetMethod(MethodInfo method, TypeBuilderInstantiation type)
 {
     return(new MethodOnTypeBuilderInstantiation(method, type));
 }
 internal PropertyOnTypeBuilderInst(TypeBuilderInstantiation instantiation, PropertyInfo prop)
 {
     this.instantiation = instantiation;
     this.prop          = prop;
 }
Пример #32
0
 internal MethodOnTypeBuilderInstantiation(MethodInfo method, TypeBuilderInstantiation type)
 {
     this.m_method = method;
     this.m_type   = type;
 }
Пример #33
0
		public MethodOnTypeBuilderInst (TypeBuilderInstantiation instantiation, MethodInfo base_method)
		{
			this.instantiation = instantiation;
			this.base_method = base_method;
		}
 public FieldOnTypeBuilderInst(TypeBuilderInstantiation instantiation, FieldInfo fb)
 {
     this.instantiation = instantiation;
     this.fb            = fb;
 }
Пример #35
0
 // Token: 0x06004DBC RID: 19900 RVA: 0x001173C5 File Offset: 0x001155C5
 internal ConstructorOnTypeBuilderInstantiation(ConstructorInfo constructor, TypeBuilderInstantiation type)
 {
     this.m_ctor = constructor;
     this.m_type = type;
 }
Пример #36
0
 internal EventOnTypeBuilderInst(TypeBuilderInstantiation instantiation, EventInfo evt)
 {
     this.instantiation = instantiation;
     this.event_info    = evt;
 }
Пример #37
0
		internal PropertyOnTypeBuilderInst (TypeBuilderInstantiation instantiation, PropertyInfo prop)
		{
			this.instantiation = instantiation;
			this.prop = prop;
		}
Пример #38
0
 public MethodOnTypeBuilderInst(TypeBuilderInstantiation instantiation, MethodInfo base_method)
 {
     this.instantiation = instantiation;
     this.base_method   = base_method;
 }
 internal FieldOnTypeBuilderInstantiation(System.Reflection.FieldInfo field, TypeBuilderInstantiation type)
 {
     this.m_field = field;
     this.m_type = type;
 }