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); } }
public virtual void CompileViews([NotNull] IBeforeCompileContext context) { var descriptors = CreateCompilationDescriptors(context); if (descriptors.Any()) { var collectionGenerator = new RazorFileInfoCollectionGenerator( descriptors, CompilationSettings); var tree = collectionGenerator.GenerateCollection(); context.CSharpCompilation = context.CSharpCompilation.AddSyntaxTrees(tree); } }
public virtual void CompileViews([NotNull] IBeforeCompileContext context) { var descriptors = CreateCompilationDescriptors(context); if (descriptors.Count > 0) { var collectionGenerator = new RazorFileInfoCollectionGenerator( descriptors, SyntaxTreeGenerator.GetParseOptions(context.CSharpCompilation)); var tree = collectionGenerator.GenerateCollection(); context.CSharpCompilation = context.CSharpCompilation.AddSyntaxTrees(tree); } }