public RazorAssemblyCacheProviderWrapper(DefaultCompilerCacheProvider defaultCacheProvider, CachePathFactory factory, IHostingEnvironment env, ILoggerFactory loggerFactory) { var logger = loggerFactory.CreateLogger(typeof(RazorAssemblyCache)); Cache = new RazorAssemblyCache(defaultCacheProvider.Cache, factory, env.ContentRootFileProvider, logger); }
public RazorAssemblyCache(ICompilerCache cache, CachePathFactory cachePathFactory, IFileProvider contentFileProvider, ILogger logger) { _cache = cache; _contentFileProvider = contentFileProvider; _logger = logger; CachePathMaker = cachePathFactory; }
/// <summary> /// Initalizes a new instance of the <see cref="RoslynCompilationServiceWithDump" /> class. /// </summary> /// <param name="compiler">The <see cref="CSharpCompiler" />.</param> /// <param name="optionsAccessor">Accessor to <see cref="RazorViewEngineOptions" />.</param> /// <param name="fileProviderAccessor">The <see cref="IRazorViewEngineFileProviderAccessor" />.</param> /// <param name="loggerFactory">The <see cref="RoslynCompilationServiceWithDump" />.</param> public RoslynCompilationServiceWithDump( CSharpCompiler compiler, IRazorViewEngineFileProviderAccessor fileProviderAccessor, IOptions <RazorViewEngineOptions> optionsAccessor, ILoggerFactory loggerFactory, CachePathFactory factory) { _compiler = compiler; _factory = factory; _fileProvider = fileProviderAccessor.FileProvider; _compilationCallback = optionsAccessor.Value.CompilationCallback; _logger = loggerFactory.CreateLogger <DefaultRoslynCompilationService>(); }