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 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 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) { 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); }
// 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 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 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; }