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);
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 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;
 }