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.v21.1.Web.dll


public static void RegisterSingleton<T>(
    T instance


Name Type Description
instance T

A Object value, specifying the custom service.

Type Parameters



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