public void ExpireChangeTokens() { // Use a new scope to get the file provider using (IServiceScope scope = _serviceScopeFactory.CreateScope()) { FileSystemFileProvider fileProvider = scope.ServiceProvider.GetService <FileSystemFileProvider>(); fileProvider.ExpireChangeTokens(); } }
public HostingEnvironment(FileSystemFileProvider fileProvider) { EnvironmentName = "Statiq"; // This gets used to load dependencies and is passed to Assembly.Load() ApplicationName = typeof(HostingEnvironment).Assembly.FullName; WebRootPath = fileProvider.StatiqFileSystem.RootPath.FullPath; WebRootFileProvider = fileProvider; ContentRootPath = WebRootPath; ContentRootFileProvider = WebRootFileProvider; }