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
| Overload | Description |
|---|---|
| Opc | Initializes a new instance of the OpcT. |
| Opc | Initializes a new instance of the Opcserver specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Invalid | An application has already been created on the current thread and has not yet been exited ( |
OpcServerApplication()
Initializes a new instance of the OpcServerApplication<T> class which hosts a new instance of the type T.
public OpcServerApplication()Public Sub New()OpcServerApplication(T)
Initializes a new instance of the OpcServerApplication<T> class using the server specified.
public OpcServerApplication(T server)Public Sub New(server As T)Parameters
| Name | Type | Description |
|---|---|---|
server | T | The server to host. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The server is a null reference ( |
Properties
Configuration
Gets the configuration of the Server.
public override OpcApplicationConfiguration Configuration { get; }Public Overrides ReadOnly Property Configuration As OpcApplicationConfigurationProperty value
The Configuration of the Server.
Overrides
Server
Gets the server hosted by the application.
public T Server { get; }Public ReadOnly Property Server As TProperty value
T
The instance of the type T hosted by the application.
Methods
ExitCore
Stops the Server and raises the Exiting and Exited events.
protected override void ExitCore()Protected Overrides Sub ExitCore()Overrides
Remarks
The method does nothing unless the State of the Server is Started.
LoadConfigurationCore
Loads the server configuration from the configuration section with the configSectionName specified and assigns it to the Server.
protected override void LoadConfigurationCore(string configSectionName)Protected Overrides Sub LoadConfigurationCore(configSectionName As String)Parameters
| Name | Type | Description |
|---|---|---|
config | String | The name of the configuration section or a null reference (T. |
Overrides
RunCore
Starts the Server and waits until the application exits.
protected override int RunCore()Protected Overrides Function RunCore() As IntegerReturns
The ExitCode.
Exceptions
| Exception | Condition |
|---|---|
| Invalid | The Server is being started or has been started. |
Overrides
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.

