Skip to content

Reference

OpcClientApplication Members

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.

Reference

OpcClientApplication<T> Members ​

Type
OpcClientApplication<T>
Namespace
Opc.UaFx.Client
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Inherits members from OpcApplication.

Constructors ​

OpcClientApplication ​

2 overloads

OverloadDescription
OpcClientApplication()Initializes a new instance of the OpcClientApplication<T> class which hosts a new instance of the type T.
OpcClientApplication(T)Initializes a new instance of the OpcClientApplication<T> class using the client specified.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionAn application has already been created on the current thread and has not yet been exited (see Current).

OpcClientApplication() ​

Initializes a new instance of the OpcClientApplication<T> class which hosts a new instance of the type T.

csharp
public OpcClientApplication()
vbnet
Public Sub New()

OpcClientApplication(T) ​

Initializes a new instance of the OpcClientApplication<T> class using the client specified.

csharp
public OpcClientApplication(T client)
vbnet
Public Sub New(client As T)

Parameters

NameTypeDescription
clientTThe client to host.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe client is a null reference (Nothing in Visual Basic).

Properties ​

Client ​

Gets the client hosted by the application.

csharp
public T Client { get; }
vbnet
Public ReadOnly Property Client As T

Property value

T

The instance of the type T hosted by the application.

Configuration ​

override

Gets the configuration of the Client.

csharp
public override OpcApplicationConfiguration Configuration { get; }
vbnet
Public Overrides ReadOnly Property Configuration As OpcApplicationConfiguration

Property value

OpcApplicationConfiguration

The Configuration of the Client.

Overrides

Configuration

Methods ​

ExitCore ​

protected · override

Disconnects the Client from the server and raises the Exiting and Exited events.

csharp
protected override void ExitCore()
vbnet
Protected Overrides Sub ExitCore()

Overrides

ExitCore

Remarks

The method disconnects the Client and raises the events only if the State of the Client is Connecting, Connected, Reconnecting or Reconnected. While the client connects, the method waits until connecting has completed. In a non-interactive environment (see UserInteractive) the method ends a waiting Run in any state, e.g. also if the client has been disconnected because reconnecting failed.

LoadConfigurationCore ​

protected · override

Loads the client configuration from the configuration section with the configSectionName specified and assigns it to the Client.

csharp
protected override void LoadConfigurationCore(string configSectionName)
vbnet
Protected Overrides Sub LoadConfigurationCore(configSectionName As String)

Parameters

NameTypeDescription
configSectionNameStringThe name of the configuration section or a null reference (Nothing in Visual Basic) to use the full name of the type T.

Overrides

LoadConfigurationCore

RunCore ​

protected · override

Connects the Client to the server and waits until the application exits.

csharp
protected override int RunCore()
vbnet
Protected Overrides Function RunCore() As Integer

Returns

Int32

The ExitCode.

Exceptions

ExceptionCondition
InvalidOperationExceptionThe Client is connecting or connected to the server.

Overrides

RunCore

Remarks

The method connects the client only in the state Created or Disconnected; in any other state it returns at once. In an interactive environment (see UserInteractive) the method reports the result on the console, waits for a key and exits the application. Otherwise the method returns at once if connecting failed, without passing on the exception, and else waits until the application is exited.