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