Skip to content

Reference

OpcServerApplication Members

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

Reference

OpcServerApplication<T> Members ​

Type
OpcServerApplication<T>
Namespace
Opc.UaFx.Server
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Inherits members from OpcApplication.

Constructors ​

OpcServerApplication ​

2 overloads

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

Exceptions (all overloads)

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

OpcServerApplication() ​

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

csharp
public OpcServerApplication()
vbnet
Public Sub New()

OpcServerApplication(T) ​

Initializes a new instance of the OpcServerApplication<T> class using the server specified.

csharp
public OpcServerApplication(T server)
vbnet
Public Sub New(server As T)

Parameters

NameTypeDescription
serverTThe server to host.

Exceptions

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

Properties ​

Configuration ​

override

Gets the configuration of the Server.

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

Property value

OpcApplicationConfiguration

The Configuration of the Server.

Overrides

Configuration

Server ​

Gets the server hosted by the application.

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

Property value

T

The instance of the type T hosted by the application.

Methods ​

ExitCore ​

protected · override

Stops the Server and raises the Exiting and Exited events.

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

Overrides

ExitCore

Remarks

The method does nothing unless the State of the Server is Started.

LoadConfigurationCore ​

protected · override

Loads the server configuration from the configuration section with the configSectionName specified and assigns it to the Server.

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

Starts 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 Server is being started or has been started.

Overrides

RunCore

Remarks

The method starts the server only in the state Created or Stopped; 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 starting failed, without passing on the exception, and else waits until the application is exited.