public static OverloadsCollection Create(IEmitter emitter, ConstructorDeclaration constructorDeclaration) { string key = constructorDeclaration.GetHashCode().ToString(); if (emitter.OverloadsCache.ContainsKey(key)) { return emitter.OverloadsCache[key]; } return new OverloadsCollection(emitter, constructorDeclaration); }
public static OverloadsCollection Create(IEmitter emitter, ConstructorDeclaration constructorDeclaration) { string key = constructorDeclaration.GetHashCode().ToString(); if (emitter.OverloadsCache.ContainsKey(key)) { return(emitter.OverloadsCache[key]); } return(new OverloadsCollection(emitter, constructorDeclaration)); }
private OverloadsCollection(IEmitter emitter, ConstructorDeclaration constructorDeclaration) { this.Emitter = emitter; this.Name = constructorDeclaration.Name; this.JsName = this.Emitter.GetEntityName(constructorDeclaration, false, true); this.Inherit = false; this.Constructor = true; this.Static = constructorDeclaration.HasModifier(Modifiers.Static); this.Member = this.FindMember(constructorDeclaration); this.TypeDefinition = this.Member.DeclaringTypeDefinition; this.Type = this.Member.DeclaringType; this.InitMembers(); this.Emitter.OverloadsCache[constructorDeclaration.GetHashCode().ToString()] = this; }
private OverloadsCollection(IEmitter emitter, ConstructorDeclaration constructorDeclaration) { this.Emitter = emitter; this.Name = constructorDeclaration.Name; this.JsName = this.Emitter.GetEntityName(constructorDeclaration, false, true); this.Inherit = false; this.Constructor = true; this.Static = constructorDeclaration.HasModifier(Modifiers.Static); this.Member = this.FindMember(constructorDeclaration); this.TypeDefinition = this.Member.DeclaringTypeDefinition; this.Type = this.Member.DeclaringType; this.InitMembers(); this.Emitter.OverloadsCache[constructorDeclaration.GetHashCode().ToString()] = this; }