public override RazorCodeGenerator DecorateCodeGenerator(RazorCodeGenerator incomingCodeGenerator) { if (!incomingCodeGenerator.Host.DesignTimeMode) { var generator = new MinifyHtmlCodeGenerator(_minifier); if (incomingCodeGenerator is CSharpRazorCodeGenerator) { return new MinifyHtmlCSharpCodeGenerator(generator, incomingCodeGenerator.ClassName, incomingCodeGenerator.RootNamespaceName, incomingCodeGenerator.SourceFileName, incomingCodeGenerator.Host); } if (incomingCodeGenerator is VBRazorCodeGenerator) { return new MinifyHtmlVBCodeGenerator(generator, incomingCodeGenerator.ClassName, incomingCodeGenerator.RootNamespaceName, incomingCodeGenerator.SourceFileName, incomingCodeGenerator.Host); } } return base.DecorateCodeGenerator(incomingCodeGenerator); }
public MinifyHtmlVBCodeGenerator(MinifyHtmlCodeGenerator generator, string className, string rootNamespaceName, string sourceFileName, RazorEngineHost host) : base(className, rootNamespaceName, sourceFileName, host) { _generator = generator; }