# OpcClientApplication&lt;T&gt; Class

> Reference: Provides a base class for applications which host a client of the type T and connect it to the server when the application is run.

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcClientApplication&lt;T&gt; Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Provides a base class for applications which host a client of the type `T` and connect it to the server when the application is run.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public class OpcClientApplication<T> : OpcApplication where T : OpcClient, new()
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
<CLSCompliant(False)>
Public Class OpcClientApplication(Of T As {OpcClient, New})
    Inherits OpcApplication
```

</div>

## Type parameters

| Name | Description |
|---|---|
| `T` | The type of the client to host. |

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcApplication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcapplication/) → **OpcClientApplication&lt;T&gt;**

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></li>
<li><a href="../opc.uafx.iopcapplication/">IOpcApplication</a></li>
</ul>

## Derived types

- [OpcClientApplication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication/)

## Constructors

| Name | Description |
|---|---|
| [OpcClientApplication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#opcclientapplication)<span class="api-meta">2 overloads</span> | Initializes a new instance of the OpcClientApplication&lt;T&gt; class which hosts a new instance of the type `T`. |

## Properties

| Name | Description |
|---|---|
| [Client](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#client) | Gets the client hosted by the application. |
| [Configuration](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#configuration)<span class="api-meta">override</span> | Gets the configuration of the [Client](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#client). |

## Methods

| Name | Description |
|---|---|
| [ExitCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#exitcore)<span class="api-meta">protected · override</span> | Disconnects the [Client](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#client) from the server and raises the [Exiting](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcapplication/members#exiting) and [Exited](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcapplication/members#exited) events. |
| [LoadConfigurationCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#loadconfigurationcore)<span class="api-meta">protected · override</span> | Loads the client configuration from the configuration section with the `configSectionName` specified and assigns it to the [Client](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#client). |
| [RunCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#runcore)<span class="api-meta">protected · override</span> | Connects the [Client](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientapplication-1/members#client) to the server and waits until the application exits. |

Inherits members from [OpcApplication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcapplication/members).

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
