SpreadsheetOptionsExtensions.AddHibernation(SpreadsheetOptions, Action<HibernationOptions>) Method
In This Article
Sets hibernation options for Spreadsheet.
Namespace: DevExpress.AspNetCore
Assembly: DevExpress.AspNetCore.Spreadsheet.v24.2.dll
NuGet Package: DevExpress.AspNetCore.Spreadsheet
#Declaration
C#
public static SpreadsheetOptions AddHibernation(
this SpreadsheetOptions spreadsheetOptions,
Action<HibernationOptions> setupHibernation
)
#Parameters
Name | Type | Description |
---|---|---|
spreadsheet |
Spreadsheet |
Spreadsheet options. |
setup |
Action<Hibernation |
A function that configures hibernation options. |
#Returns
Type | Description |
---|---|
Spreadsheet |
An object that can be used to further configure the Spreadsheet options. |
#Remarks
The example below demonstrates how to configure hibernation options:
builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
builder.Services.AddDevExpressControls(options => {
options.AddSpreadsheet(
spreadsheetOptions => {
spreadsheetOptions
.AddHibernation( hibernationOptions => {
hibernationOptions.StoragePath = Path.Combine(builder.Environment.ContentRootPath, "HibernationStorage");
hibernationOptions.Timeout = TimeSpan.FromMinutes(20);
hibernationOptions.DocumentsDisposeTimeout = TimeSpan.FromDays(1);
hibernationOptions.AllDocumentsOnApplicationEnd = true;
});
}
);
});
See Also