Exemplo n.º 1
0
        public override void AppendOutput(
            StringBuilder output,
            int baseIndentation,
            TypeScriptModule module)
        {
            BeginModule(
                output,
                baseIndentation,
                module);


            EnumOutputAppender enumAppender = new EnumOutputAppender(
                this.Settings,
                this.TypeContext,
                module.IsGlobal);

            foreach (var tsEnum in module.Enums)
            {
                enumAppender.AppendOutput(
                    output,
                    baseIndentation + 4,
                    tsEnum);
            }

            if (!this.Settings.OrderInterfacesByReference)
            {
                this.AppendInterfacesInCreatedOrder(
                    output,
                    baseIndentation + 4,
                    module);
            }
            else
            {
                this.AppendInterfacesInReferenceOrder(
                    output,
                    baseIndentation + 4,
                    module);
            }

            this.EndModule(
                output,
                module);
        }
        public override void AppendOutput(TypeScriptModule module)
        {
            BeginModule(module);

            var enumAppender = new EnumOutputAppender(Output, BaseIndentation + 4, Settings);

            foreach (TypeScriptEnum tsEnum in module.Enums)
            {
                enumAppender.AppendOutput(tsEnum);
            }

            var interfaceAppender = new InterfaceOutputAppender(Output, BaseIndentation + 4, Settings, module.IsGlobal);

            foreach (TypeScriptInterface tsInterface in module.Interfaces)
            {
                interfaceAppender.AppendOutput(tsInterface);
            }

            EndModule(module);
        }