Пример #1
0
        public HoganPipeline(TinyIoCContainer container, HoganSettings hoganSettings)
            : base(container)
        {
            var renderer = container.Resolve <RemoteHtmlTemplateBundleRenderer>();

            Add(new AssignHtmlTemplateRenderer(renderer));
            Add(new AssignContentType("text/javascript"));
            Add <ParseHtmlTemplateReferences>();
            Add <CompileHogan>();
            Add <RegisterTemplatesWithHogan.Factory>(create => create(hoganSettings.JavaScriptVariableName));
            Add <AssignHash>();
            Add <ConcatenateAssets>();
        }
Пример #2
0
        public HoganPipeline(TinyIoCContainer container, HoganSettings hoganSettings)
            : base(container)
        {
            var renderer = container.Resolve <RemoteHtmlTemplateBundleRenderer>();

            AddRange(new IBundleProcessor <HtmlTemplateBundle>[]
            {
                new AssignHtmlTemplateRenderer(renderer),
                new AssignContentType("text/javascript"),
                new ParseHtmlTemplateReferences(),
                container.Resolve <CompileHogan>(),
                new RegisterTemplatesWithHogan(hoganSettings.JavaScriptVariableName),
                new AssignHash(),
                new ConcatenateAssets()
            });
        }