TX Text Control .NET Server

AddTXDocumentViewer Method

Method|Introduced in 34.5.0
Namespace
TXTextControl.Web.MVC.DocumentViewer.Hosting
Package
TXTextControl.Web.DocumentViewer as TXTextControl.Web.MVC.DocumentViewer.dll from nuget.org, the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.Web.DocumentViewer.Classic as TXTextControl.Web.MVC.DocumentViewer.dll

Description

Registers the viewer and applies hosting configuration.

Registers the viewer with default process settings.

Syntax

AddTXDocumentViewer(IServiceCollection, Action<DocumentViewerOptions>)

Call this overload during application startup when the worker process and document viewer hosting options need to be configured explicitly. Call UseTXDocumentViewerExtension.UseTXDocumentViewer after routing has been configured.

public static IServiceCollection AddTXDocumentViewer(this IServiceCollection services, Action<DocumentViewerOptions> setupAction);
ParameterDescription
services

The application's service collection.

setupAction

Configuration for the worker processes.

AddTXDocumentViewer(IServiceCollection)

Call this overload during application startup when the default worker process settings are sufficient. Call UseTXDocumentViewerExtension.UseTXDocumentViewer after routing has been configured.

public static IServiceCollection AddTXDocumentViewer(this IServiceCollection services);
ParameterDescription
services

The application's service collection.

Examples

Example usage.

public void ConfigureServices(IServiceCollection services) { services.AddTXDocumentViewer(options => { options.Process.WorkerPool.Count = 4; options.Process.WorkerPool.QueueCapacity = 8; }); }

Example usage.

public void ConfigureServices(IServiceCollection services) { services.AddTXDocumentViewer(); }

Remarks

Call this overload during application startup when the worker process and document viewer hosting options need to be configured explicitly. Call UseTXDocumentViewerExtension.UseTXDocumentViewer after routing has been configured.

Call this overload during application startup when the default worker process settings are sufficient. Call UseTXDocumentViewerExtension.UseTXDocumentViewer after routing has been configured.