Skip to main content

SpreadsheetOptionsExtensions.RegisterOfficeStateProvider(SpreadsheetOptions, OfficeStateProviderBase) Method

Registers a custom session state provider.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Spreadsheet.v22.1.dll

Declaration

public static SpreadsheetOptions RegisterOfficeStateProvider(
    this SpreadsheetOptions spreadsheetOptions,
    OfficeStateProviderBase provider
)

Parameters

Name Type Description
spreadsheetOptions SpreadsheetOptions

Spreadsheet options.

provider OfficeStateProviderBase

A custom state provider.

Returns

Type Description
SpreadsheetOptions

An object that can be used to further configure the Spreadsheet options.

Remarks

The example below demonstrates how to register a custom session state provider:

builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
builder.Services.AddDevExpressControls(options => {
    options.AddSpreadsheet(
        spreadsheetOptions => {
            spreadsheetOptions
                .RegisterOfficeStateProvider(myOfficeStateProvider);
        }
    );
});

Refer to the following example for session-state store provider implementations: ASP.NET Office Solutions.

See Also