StorageCleanerSettings Class
Provides time settings to clean a storage for storing documents and reports.
Namespace: DevExpress.XtraReports.Web.WebDocumentViewer
Assembly: DevExpress.XtraReports.v18.2.Web.dll
Declaration
Related API Members
The following members return StorageCleanerSettings objects:
Remarks
According to the time settings specified in the StorageCleanerSettings class, the default cleaner service periodically checks if the file storage contains documents/exported documents/reports whose lifetime exceeds a specific amount of time. If such reports are found, they are deleted. You can register a new instance of the StorageCleanerSettings class with required time settings using the DefaultWebDocumentViewerContainer.Register<T, TImpl> (.NET Framework)/ AddSingleton (.NET Core) method.
The following code demonstrates how to register custom settings in a .NET Framework application.
using DevExpress.XtraReports.Web.WebDocumentViewer;
//...
void Application_Start(object sender, EventArgs e) {
var dueTime = TimeSpan.FromSeconds(30);
var period = TimeSpan.FromSeconds(30);
var reportTimeTolive = TimeSpan.FromSeconds(30);
var documentTimeToLive = TimeSpan.FromSeconds(30);
var exportedDocumentTimeToLive = TimeSpan.FromSeconds(30);
DefaultWebDocumentViewerContainer.RegisterSingleton<StorageCleanerSettings>(new StorageCleanerSettings(dueTime, period, reportTimeTolive, documentTimeToLive, exportedDocumentTimeToLive));
}
//...
The following code demonstrates how to register custom settings in a .NET Core application.
using DevExpress.AspNetCore;
using DevExpress.AspNetCore.Reporting;
using DevExpress.XtraReports.Web.WebDocumentViewer;
//...
public class Startup {
//...
public void ConfigureServices(IServiceCollection services) {
services.AddDevExpressControls();
services.AddMvc();
var dueTime = TimeSpan.FromSeconds(30);
var period = TimeSpan.FromSeconds(30);
var reportTimeTolive = TimeSpan.FromSeconds(30);
var documentTimeToLive = TimeSpan.FromSeconds(30);
var exportedDocumentTimeToLive = TimeSpan.FromSeconds(30);
services.AddSingleton<StorageCleanerSettings>(new StorageCleanerSettings(dueTime, period, reportTimeTolive, documentTimeToLive, exportedDocumentTimeToLive));
});
}
//...
}
Related API
ASP.NET WebForms / ASP.NET MVC | ASP.NET Core |
---|---|