Ejemplo n.º 1
0
        public virtual void CompileViews()
        {
            var result = CreateFileInfoCollection();

            if (result != null)
            {
                var generatedCode = RazorFileInfoCollectionGenerator.GenerateCode(result);
                var syntaxTree    = CSharpSyntaxTree.ParseText(
                    generatedCode,
                    SyntaxTreeGenerator.GetParseOptions(CompilationSettings));
                CompileContext.Compilation = CompileContext.Compilation.AddSyntaxTrees(syntaxTree);
            }
        }
Ejemplo n.º 2
0
        public virtual void CompileViews()
        {
            var result = CreateFileInfoCollection();

            if (result != null)
            {
                var collectionGenerator = new RazorFileInfoCollectionGenerator(
                    result,
                    CompilationSettings);

                var tree = collectionGenerator.GenerateCollection();
                CompileContext.Compilation = CompileContext.Compilation.AddSyntaxTrees(tree);
            }
        }