The requested page is not available for the requested platform. You are viewing the content for Default platform.

DefaultWebDocumentViewerContainer.RegisterSingleton<T>(T) Method

Enables registering a specified custom service instance in a Web Document Viewer.

Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

Assembly: DevExpress.XtraReports.v18.2.Web.dll

Declaration

public static void RegisterSingleton<T>(
    T instance
)
Public Shared Sub RegisterSingleton(Of T)(
    instance As T
)

Parameters

Name Type Description
instance T

A Object value, specifying the custom service.

Type Parameters

Name Description
T

Remarks

Call the RegisterSingleton<T> method at the application startup in the Global.asax file to register a custom service in the Web Document Viewer. For instance, the following code demonstrates how to register a custom WebDocumentViewerOperationLogger implementation:

using DevExpress.XtraReports.Web.WebDocumentViewer;
// ...

protected void Application_Start(object sender, System.EventArgs e) {
    // ...
    DefaultWebDocumentViewerContainer.RegisterSingleton<WebDocumentViewerOperationLogger, MyOperationLogger>();
}

See Register Services in the Document Viewer for a complete list of available services and their registration methods.

See Also