# .NET API

> The namespaces and main classes of the DS Server NuGet packages DocumentProcessing, Admin and Plugin.Abstractions, and which package a C# class comes from.

- **Product:** DS Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** DS Server > API Reference > .NET API
- **1761 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/dotnet-api/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/dotnet-api/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/dotnet-api/llms-full.txt

---

C# code works with DS Server through three NuGet packages. Two of them run in your application and call the Web API: `TXTextControl.DocumentServices.DocumentProcessing` for documents and `TXTextControl.DocumentServices.Admin` for the administration of the server. The third, `TXTextControl.DocumentServices.Plugin.Abstractions`, is used by plugins, assemblies that DS Server loads to add endpoints and services of its own.

The navigation lists a page for each package with the README or description it is published with on nuget.org. The tables below name the namespaces of each package and their main classes, so that you know which package and `using` directive a class needs.

### Packages

| Package | Version | Target frameworks | Used by |
|---|---|---|---|
| [TXTextControl.DocumentServices.DocumentProcessing](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-documentprocessing/llms-full.txt) | 5.0.0 | .NET 8, .NET 10 | Your application: converts, merges and creates documents through the DocumentProcessing Web API |
| [TXTextControl.DocumentServices.Admin](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-admin/llms-full.txt) | 5.0.0 | .NET 8, .NET 10 | Your application: manages security profiles, OAuth and authentication servers through the administration Web API |
| [TXTextControl.DocumentServices.Plugin.Abstractions](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-plugin-abstractions/llms-full.txt) | 5.0.1 | .NET 8, .NET 10 | A plugin: the plugin interface and the services DS Server passes to it |

The packages for the Document Editor and the Document Viewer in ASP.NET Core views, `TXTextControl.DocumentServices.DocumentEditor` and `TXTextControl.DocumentServices.DocumentViewer`, are described with their settings in [ASP.NET Core](https://docs.textcontrol.com/ds-server/client-libraries/aspnet-core/llms-full.txt).

### TXTextControl.DocumentServices.DocumentProcessing

| Namespace | Main types | What they do |
|---|---|---|
| `TXTextControl.DocumentServices.DocumentProcessing` | `DocumentProcessing` | Sends requests to the DocumentProcessing Web API: `Convert`, `Merge`, `Append`, `FindAndReplace`, `Thumbnails`, `Info` and `InstalledPrinters`, below `PDF` the methods `Create`, `GetEmbeddedFiles`, `GetMetaData` and `AcroForms.GetFields`, and below `Barcodes` the methods `Create`, `GetDefaultText`, `GetMinimumTextLength`, `GetMaximumTextLength` and `IsTextValid` |
|  | `MergeBody`, `MergeSettings`, `AppendBody`, `AppendDocument`, `FindAndReplaceBody`, `DocumentSettings` | The request data of merge, append and find and replace, and the document properties |
|  | `DocumentInfo`, `MergeField`, `MergeBlock`, `PrinterInfo` | The information that `Info` and `InstalledPrinters` return |
|  | `ReturnFormat`, `ImageFormat`, `DocumentDivider`, `FormFieldMergeType` | Enumerations of the formats and options |
|  | `ServiceRequestException` | Thrown when a request fails; `StatusCode` holds the HTTP status code |
| `TXTextControl.DocumentServices.DocumentProcessing.PDF` | `PDFSettings`, `DigitalSignature`, `EmbeddedFile` | PDF settings, the certificate for a digital signature and the files that `PDF.GetEmbeddedFiles` returns |
|  | `PDFFormat`, `DocumentAccessPermissions` | Enumerations of the PDF options |
| `TXTextControl.DocumentServices.DocumentProcessing.PDF.AcroForms` | `FormField` | The base class of the form fields that `PDF.AcroForms.GetFields` returns |
| `TXTextControl.DocumentServices.DocumentProcessing.Barcodes` | `BarcodeSettings`, `BarcodeType`, `BarcodeImageFormat` | The content and appearance of a barcode, and the enumerations of the barcode types and image formats |
| `TXTextControl.DocumentServices.DocumentProcessing.OAuth` | `OAuthSettings` | The client ID, client secret and redirect URI of the security profile |

Each method corresponds to an endpoint of the [DocumentProcessing Web API](https://docs.textcontrol.com/ds-server/reference/web-api/documentprocessing/llms-full.txt), whose page describes the parameters and the result. [ASP.NET Core](https://docs.textcontrol.com/ds-server/client-libraries/aspnet-core/#documentprocessing) maps the methods to the endpoints and shows the package in a controller.

### TXTextControl.DocumentServices.Admin

| Namespace | Main types | What they do |
|---|---|---|
| `TXTextControl.DocumentServices.Admin` | `Admin` | Connects with the URL of DS Server and the admin password, and adds, reads, changes and deletes security profiles, switches OAuth, manages authentication servers and changes passwords |
|  | `SecurityProfile`, `ClientCredentials` | A security profile with its name, expiry date and grant type setting, and its client ID, secret and authorized redirect URIs |
|  | `AuthenticationServer` | An authentication server with its ID, name and URL |
|  | `ServiceRequestException` | Thrown when a request fails; `StatusCode` holds the HTTP status code |

The methods call the [Administration](https://docs.textcontrol.com/ds-server/reference/web-api/administration/llms-full.txt) endpoints of the Web API. [ASP.NET Core](https://docs.textcontrol.com/ds-server/client-libraries/aspnet-core/#admin) lists them.

### TXTextControl.DocumentServices.Plugin.Abstractions

This package holds more than the plugin interface: it also defines the services that DS Server 5.0 and later passes to a plugin by dependency injection, with their own namespaces.

| Namespace | Main types | What they do |
|---|---|---|
| `TXTextControl.DocumentServices.Plugin.Abstractions` | `IPlugin`, `PluginContext` | The interface every plugin implements, with `ConfigureServices`, `ConfigureMiddleware`, `OnStart` and `OnStop`, and the context that gives a plugin the DS Server version, the base directory of the DS Server installation and the configuration |
| `TXTextControl.DocumentServices.DocumentProcessing.Abstractions` | `IDocumentProcessingService`, `IPdfApi`, `IAcroFormsApi`, `IBarcodesApi` | Document processing inside DS Server: `MergeAsync`, `ConvertAsync`, `AppendAsync`, `FindAndReplaceAsync`, `GetThumbnailsAsync`, `GetDocumentInfoAsync`, and the PDF, AcroForms and barcode APIs |
| `TXTextControl.DocumentServices.DocumentProcessing.Models` | `MergeBody`, `MergeSettings`, `BarcodeSettings`, `FormField`, `ReturnFormat` | The data and enumerations of `IDocumentProcessingService` |
| `TXTextControl.DocumentServices.DocumentEditor.Abstractions` | `IDocumentEditorSessionService`, `IDocumentEditorSession`, `ISelection`, `IParagraphFormat` | Access to the open Document Editor sessions and to the document in each |
| `TXTextControl.DocumentServices.DocumentEditor.Options` | `LoadOptions`, `SaveOptions` | Options for loading a document into a session and saving it |
| `TXTextControl.DocumentServices.DocumentEditor.Enums` | `DocumentFormat`, `EditMode`, `TextFieldType` | Enumerations of the editor session API |

Some type names, such as `MergeBody` and `ReturnFormat`, exist both in the DocumentProcessing client package and in the plugin package, in different namespaces. A plugin uses the types of `TXTextControl.DocumentServices.DocumentProcessing.Models`; an application that calls the Web API uses those of the client package. [Plugins](https://docs.textcontrol.com/ds-server/plugins/llms-full.txt) explains how a plugin is built and deployed.

### Pages in This Section

- [DocumentProcessing](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-documentprocessing/llms-full.txt): the client package for the DocumentProcessing Web API.
- [Admin](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-admin/llms-full.txt): the client package for the administration Web API.
- [Plugin.Abstractions](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-plugin-abstractions/llms-full.txt): the package plugins are built with.

---

## In This Section

- [TXTextControl.DocumentServices.Admin](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-admin/llms-full.txt)
- [TXTextControl.DocumentServices.DocumentProcessing](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-documentprocessing/llms-full.txt)
- [TXTextControl.DocumentServices.Plugin.Abstractions](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-plugin-abstractions/llms-full.txt)

---

## Nearby

- **Previous:** [GET /authenticationserver/authorize](https://docs.textcontrol.com/ds-server/reference/web-api/authenticationserver/authorize/get/llms-full.txt)
- **Next:** [TXTextControl.DocumentServices.DocumentProcessing](https://docs.textcontrol.com/ds-server/reference/dotnet-api/txtextcontrol-documentservices-documentprocessing/llms-full.txt)
