public virtual RazorEngineBuilder UseProject(TkRazorProject project) { TkDebug.AssertArgumentNull(project, nameof(project), this); Project = project; return(this); }
public RazorSourceGenerator(RazorEngine projectEngine, TkRazorProject project = null, ISet <string> namespaces = null) { TkDebug.AssertArgumentNull(projectEngine, nameof(projectEngine), null); Namespaces = namespaces ?? new HashSet <string>(); ProjectEngine = projectEngine; Project = project; DefaultImports = GetDefaultImports(); }
public RazorTemplateCompiler(RazorSourceGenerator sourceGenerator, RoslynCompilationService roslynCompilationService, TkRazorProject razorLightProject, TkRazorOptions razorLightOptions) { TkDebug.AssertArgumentNull(sourceGenerator, nameof(sourceGenerator), null); TkDebug.AssertArgumentNull(roslynCompilationService, nameof(roslynCompilationService), null); //TkDebug.AssertArgumentNull(razorLightProject, nameof(razorLightProject), null); TkDebug.AssertArgumentNull(razorLightOptions, nameof(razorLightOptions), null); fRazorSourceGenerator = sourceGenerator; fCompiler = roslynCompilationService; fRazorProject = razorLightProject; fRazorLightOptions = razorLightOptions; fNormalizedKeysCache = new ConcurrentDictionary <string, string>(StringComparer.Ordinal); }