# OpcServerInfo Members

> Reference: Provides company and product related information used for the properties of a server.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcServerInfo</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.server">Opc.UaFx.Server</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

## Constructors

### OpcServerInfo

<span class="api-meta">5 overloads</span>

| Overload | Description |
|---|---|
| [OpcServerInfo(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#opcserverinfo-system-string) | Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName` specified. |
| [OpcServerInfo(string, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#opcserverinfo-system-string-system-string) | Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName` and `productName` specified. |
| [OpcServerInfo(string, string, Version)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#opcserverinfo-system-string-system-string-system-version) | Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName`, `productName` and `productVersion` specified. |
| [OpcServerInfo(string, string, Version, DateTime)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#opcserverinfo-system-string-system-string-system-version-system-datetime) | Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName`, `productName`, `productVersion` and `buildDate` specified. |
| [OpcServerInfo(string, string, Version, DateTime, Uri)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#opcserverinfo-system-string-system-string-system-version-system-datetime-system-uri)<span class="api-meta">since v2.50</span> | Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName`, `productName`, `productVersion` and `buildDate` specified. |

#### OpcServerInfo(string)

Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName` specified.

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

```csharp
public OpcServerInfo(string companyName)
```

</div>

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

```vbnet
Public Sub New(companyName As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `companyName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the company which offers the server. |

#### OpcServerInfo(string, string)

Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName` and `productName` specified.

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

```csharp
public OpcServerInfo(string companyName, string productName)
```

</div>

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

```vbnet
Public Sub New(companyName As String, productName As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `companyName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the company which offers the server. |
| `productName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the product which implements the server. |

#### OpcServerInfo(string, string, Version)

Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName`, `productName` and `productVersion` specified.

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

```csharp
public OpcServerInfo(
    string companyName,
    string productName,
    Version productVersion)
```

</div>

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

```vbnet
Public Sub New(
    companyName As String,
    productName As String,
    productVersion As Version)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `companyName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the company which offers the server. |
| `productName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the product which implements the server. |
| `productVersion` | [Version](https://learn.microsoft.com/dotnet/api/system.version) | The version of the product which implements the server. |

#### OpcServerInfo(string, string, Version, DateTime)

Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName`, `productName`, `productVersion` and `buildDate` specified.

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

```csharp
public OpcServerInfo(
    string companyName,
    string productName,
    Version productVersion,
    DateTime buildDate)
```

</div>

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

```vbnet
Public Sub New(
    companyName As String,
    productName As String,
    productVersion As Version,
    buildDate As Date)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `companyName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the company which offers the server. |
| `productName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the product which implements the server. |
| `productVersion` | [Version](https://learn.microsoft.com/dotnet/api/system.version) | The version of the product which implements the server. |
| `buildDate` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) at which the product has built. |

#### OpcServerInfo(string, string, Version, DateTime, Uri)

<span class="api-meta">since v2.50</span>

Initializes a new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class using the `companyName`, `productName`, `productVersion` and `buildDate` specified.

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

```csharp
public OpcServerInfo(
    string companyName,
    string productName,
    Version productVersion,
    DateTime buildDate,
    Uri productUri)
```

</div>

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

```vbnet
Public Sub New(
    companyName As String,
    productName As String,
    productVersion As Version,
    buildDate As Date,
    productUri As Uri)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `companyName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the company which offers the server. |
| `productName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the product which implements the server. |
| `productVersion` | [Version](https://learn.microsoft.com/dotnet/api/system.version) | The version of the product which implements the server. |
| `buildDate` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) at which the product has built. |
| `productUri` | [Uri](https://learn.microsoft.com/dotnet/api/system.uri) | The URI of the product which implements the server. |

## Properties

### BuildDate

Gets the [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) at which the product has built.

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

```csharp
public DateTime BuildDate { get; }
```

</div>

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

```vbnet
Public ReadOnly Property BuildDate As Date
```

</div>

**Property value**

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

The [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) at which the product has built.

### CompanyName

Gets the name of the company which offers the server.

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

```csharp
public string CompanyName { get; }
```

</div>

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

```vbnet
Public ReadOnly Property CompanyName As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The name of the company which offers the server.

### IsProcessInfo

<span class="api-meta">since v2.58</span>

Gets a value indicating whether the information has been determined from the host process instead of from the server assembly. In this case the company is the one of the host and does not necessarily identify the organization that runs the server.

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

```csharp
public bool IsProcessInfo { get; }
```

</div>

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

```vbnet
Public ReadOnly Property IsProcessInfo As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

### ProductName

Gets the name of the product which implements the server.

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

```csharp
public string ProductName { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ProductName As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The name of the product which implements the server.

### ProductUri

<span class="api-meta">since v2.50</span>

Gets the URI of the product which implements the server.

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

```csharp
public Uri ProductUri { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ProductUri As Uri
```

</div>

**Property value**

[Uri](https://learn.microsoft.com/dotnet/api/system.uri)

The URI of the product which implements the server.

### ProductVersion

Gets the version of the product which implements the server.

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

```csharp
public Version ProductVersion { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ProductVersion As Version
```

</div>

**Property value**

[Version](https://learn.microsoft.com/dotnet/api/system.version)

The [Version](https://learn.microsoft.com/dotnet/api/system.version) of the product which implements the server.

## Methods

### FromAssembly

<span class="api-meta">static</span>

Determines the server information from the `assembly` specified.

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

```csharp
public static OpcServerInfo FromAssembly(Assembly assembly)
```

</div>

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

```vbnet
Public Shared Function FromAssembly(assembly As Assembly) As OpcServerInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `assembly` | [Assembly](https://learn.microsoft.com/dotnet/api/system.reflection.assembly) | The [Assembly](https://learn.microsoft.com/dotnet/api/system.reflection.assembly) from its [AssemblyCompanyAttribute](https://learn.microsoft.com/dotnet/api/system.reflection.assemblycompanyattribute) the [CompanyName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#companyname), its [AssemblyTitleAttribute](https://learn.microsoft.com/dotnet/api/system.reflection.assemblytitleattribute) the [ProductName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#productname), its [AssemblyVersionAttribute](https://learn.microsoft.com/dotnet/api/system.reflection.assemblyversionattribute) the [ProductVersion](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#productversion) and its [Location](https://learn.microsoft.com/dotnet/api/system.reflection.assembly.location) the [LastWriteTime](https://learn.microsoft.com/dotnet/api/system.io.filesysteminfo.lastwritetime) the [BuildDate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#builddate) is determined. |

**Returns**

[OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/)

A new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class with the information determined using the `assembly` specified.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `assembly` is a null reference (Nothing in Visual Basic). |

### FromProcess

<span class="api-meta">static</span>

Determines the server information from the `process` specified.

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

```csharp
public static OpcServerInfo FromProcess(Process process)
```

</div>

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

```vbnet
Public Shared Function FromProcess(process As Process) As OpcServerInfo
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `process` | [Process](https://learn.microsoft.com/dotnet/api/system.diagnostics.process) | The [Process](https://learn.microsoft.com/dotnet/api/system.diagnostics.process) from its [MainModule](https://learn.microsoft.com/dotnet/api/system.diagnostics.process.mainmodule) the [FileVersionInfo](https://learn.microsoft.com/dotnet/api/system.diagnostics.processmodule.fileversioninfo) is used to initialize the [CompanyName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#companyname) with the [CompanyName](https://learn.microsoft.com/dotnet/api/system.diagnostics.fileversioninfo.companyname), the [ProductName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#productname) with the [ProductName](https://learn.microsoft.com/dotnet/api/system.diagnostics.fileversioninfo.productname) and the [ProductVersion](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/members#productversion) with the [ProductVersion](https://learn.microsoft.com/dotnet/api/system.diagnostics.fileversioninfo.productversion) (fallback via [FileVersion](https://learn.microsoft.com/dotnet/api/system.diagnostics.fileversioninfo.fileversion)). |

**Returns**

[OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/)

A new instance of the [OpcServerInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverinfo/) class with the information determined using the `process` specified.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `process` is a null reference (Nothing in Visual Basic). |
