public static OverloadsCollection Create(IEmitter emitter, IndexerDeclaration indexerDeclaration, bool isSetter = false)
        {
            string key = indexerDeclaration.GetHashCode().ToString() + isSetter.GetHashCode().ToString();
            if (emitter.OverloadsCache.ContainsKey(key))
            {
                return emitter.OverloadsCache[key];
            }

            return new OverloadsCollection(emitter, indexerDeclaration, isSetter);
        }
Esempio n. 2
0
        public static OverloadsCollection Create(IEmitter emitter, IndexerDeclaration indexerDeclaration, bool isSetter = false)
        {
            string key = indexerDeclaration.GetHashCode().ToString() + isSetter.GetHashCode().ToString();

            if (emitter.OverloadsCache.ContainsKey(key))
            {
                return(emitter.OverloadsCache[key]);
            }

            return(new OverloadsCollection(emitter, indexerDeclaration, isSetter));
        }
Esempio n. 3
0
 private OverloadsCollection(IEmitter emitter, IndexerDeclaration indexerDeclaration, bool isSetter)
 {
     this.Emitter          = emitter;
     this.Name             = indexerDeclaration.Name;
     this.JsName           = Helpers.GetPropertyRef(indexerDeclaration, emitter, isSetter, true, true);
     this.Inherit          = true;
     this.Static           = false;
     this.CancelChangeCase = true;
     this.IsSetter         = isSetter;
     this.Member           = this.FindMember(indexerDeclaration);
     this.TypeDefinition   = this.Member.DeclaringTypeDefinition;
     this.Type             = this.Member.DeclaringType;
     this.InitMembers();
     this.Emitter.OverloadsCache[indexerDeclaration.GetHashCode().ToString()] = this;
 }
Esempio n. 4
0
 private OverloadsCollection(IEmitter emitter, IndexerDeclaration indexerDeclaration, bool isSetter)
 {
     this.Emitter = emitter;
     this.Name = indexerDeclaration.Name;
     this.JsName = Helpers.GetPropertyRef(indexerDeclaration, emitter, isSetter, true, true);
     this.AltJsName = Helpers.GetPropertyRef(indexerDeclaration, emitter, !isSetter, true, true);
     this.Inherit = true;
     this.Static = false;
     this.CancelChangeCase = true;
     this.IsSetter = isSetter;
     this.Member = this.FindMember(indexerDeclaration);
     this.TypeDefinition = this.Member.DeclaringTypeDefinition;
     this.Type = this.Member.DeclaringType;
     this.InitMembers();
     this.Emitter.OverloadsCache[indexerDeclaration.GetHashCode().ToString() + isSetter.GetHashCode().ToString()] = this;
 }