AddTXDocumentViewer Method
- Namespace
TXTextControl.Web. MVC. DocumentViewer. Hosting
- Package
TXTextControl.asWeb. DocumentViewer TXTextControl.from nuget.org, the private NuGet feed or Text Control Offline PackagesWeb. MVC. DocumentViewer. dll
- Also in
TXTextControl.asWeb. DocumentViewer. Classic 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);<Extension>
Public Function AddTXDocumentViewer(services As IServiceCollection, setupAction As Action(Of DocumentViewerOptions)) As IServiceCollection| Parameter | Description |
|---|---|
| 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);<Extension>
Public Function AddTXDocumentViewer(services As IServiceCollection) As IServiceCollection| Parameter | Description |
|---|---|
| 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.