internal override FieldInfo GetField(FieldInfo fromNoninstanciated) { fields ??= new Dictionary <FieldInfo, FieldInfo>(); if (!fields.TryGetValue(fromNoninstanciated, out FieldInfo? fi)) { fields[fromNoninstanciated] = fi = new FieldOnTypeBuilderInst(this, fromNoninstanciated); } return(fi); }
internal override FieldInfo GetField(FieldInfo fromNoninstanciated) { if (fields == null) { fields = new Hashtable(); } if (!fields.ContainsKey(fromNoninstanciated)) { fields [fromNoninstanciated] = new FieldOnTypeBuilderInst(this, fromNoninstanciated); } return((FieldInfo)fields [fromNoninstanciated]); }
internal override FieldInfo GetField(FieldInfo fromNoninstanciated) { if (fields == null) { fields = new Dictionary <FieldInfo, FieldInfo>(); } if (!fields.ContainsKey(fromNoninstanciated)) { fields[fromNoninstanciated] = new FieldOnTypeBuilderInst(this, fromNoninstanciated); } return(fields[fromNoninstanciated] !); }
internal override FieldInfo GetField (FieldInfo fromNoninstanciated) { initialize (); if (fields == null) fields = new Hashtable (); if (!fields.ContainsKey (fromNoninstanciated)) fields [fromNoninstanciated] = new FieldOnTypeBuilderInst (this, fromNoninstanciated); return (FieldInfo)fields [fromNoninstanciated]; }
internal override FieldInfo GetField (FieldInfo fromNoninstanciated) { initialize (); if (!(fromNoninstanciated is FieldBuilder)) throw new InvalidOperationException ("Inflating non FieldBuilder objects is not supported: " + fromNoninstanciated.GetType ()); FieldBuilder fb = (FieldBuilder)fromNoninstanciated; if (fields == null) fields = new Hashtable (); if (!fields.ContainsKey (fb)) fields [fb] = new FieldOnTypeBuilderInst (this, fb); return (FieldInfo)fields [fb]; }