Example #1
0
        private void AddType(Type type)
        {
            NamespaceCodeGenerator _codeGeneratorByNamespace;
            string ns = type.Namespace;

            if (ns == null)
            {
                ns = "";
            }
            if (codeGeneratorByNamespace.TryGetValue(ns, out _codeGeneratorByNamespace) == false)
            {
                _codeGeneratorByNamespace = new NamespaceCodeGenerator(ns, this);
                codeGeneratorByNamespace.Add(ns, _codeGeneratorByNamespace);
            }

            _codeGeneratorByNamespace.AddType(type);
        }
Example #2
0
 internal InterfaceCodeGenerator(Type type, NamespaceCodeGenerator codeGeneratorByNamespace) : base(type, codeGeneratorByNamespace)
 {
 }
 internal TypeCodeGenerator(Type type, NamespaceCodeGenerator namespaceCodeGenerator)
 {
     this.type = type;
     this.namespaceCodeGenerator = namespaceCodeGenerator;
     TypescriptType = TypescriptTypeStore.AddType(type, false);
 }