Exemplo n.º 1
0
        public virtual RazorEngineBuilder UseProject(TkRazorProject project)
        {
            TkDebug.AssertArgumentNull(project, nameof(project), this);

            Project = project;
            return(this);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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);
        }