コード例 #1
0
 public CSharpGenerator(TemplateParser templateParser, TextWriter textWriter, List<string> includedFiles)
     : base(templateParser)
 {
     this.textWriterController = new TextWriterController();
     this.textWriter = textWriter;
     this.includedFiles = includedFiles;
 }
コード例 #2
0
        public TemplateCompiler(ITextLoader textLoader, IMessageHandler messageHandler, StringCollection referencedAssemblies)
        {
            this.textLoader = textLoader;
            this.messageHandler = messageHandler;
            this.referencedAssemblies = referencedAssemblies;

            var parserRules = new Dictionary<char, IParserRule>
            {
                {'\\', new InterpolationRule() },
                {'|', new InterpolateLineRule() },
                {'=', new CallRule() },
                {'#', new PreprocessorRule() },
            };
            this.templateParser = new TemplateParser(parserRules, new PassThroughRule(), this.messageHandler);
        }