# OpcTypeSystem&lt;T&gt; Members

> Reference: Defines an abstract implementation of the IOpcTypeSystem to define type information used in different scopes of OPC UA.

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

## Constructors

### OpcTypeSystem

<span class="api-meta">protected · 2 overloads</span>

| Overload | Description |
|---|---|
| [OpcTypeSystem(OpcTypeSystemScopes)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#opctypesystem-opc-uafx-opctypesystemscopes)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) class using the `scope` specified without any fallback type system. |
| [OpcTypeSystem(OpcTypeSystemScopes, OpcTypeSystem&lt;T&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#opctypesystem-opc-uafx-opctypesystemscopes-opc-uafx-opctypesystem-of-t0)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) class using the `scope` and `fallbackTypeSystem` specified. |

#### OpcTypeSystem(OpcTypeSystemScopes)

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

Initializes a new instance of the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) class using the `scope` specified without any fallback type system.

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

```csharp
protected OpcTypeSystem(OpcTypeSystemScopes scope)
```

</div>

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

```vbnet
Protected Sub New(scope As OpcTypeSystemScopes)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `scope` | [OpcTypeSystemScopes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystemscopes/) | The [OpcTypeSystemScopes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystemscopes/) the new type system covers. |

#### OpcTypeSystem(OpcTypeSystemScopes, OpcTypeSystem&lt;T&gt;)

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

Initializes a new instance of the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) class using the `scope` and `fallbackTypeSystem` specified.

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

```csharp
protected OpcTypeSystem(
    OpcTypeSystemScopes scope,
    OpcTypeSystem<T> fallbackTypeSystem)
```

</div>

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

```vbnet
Protected Sub New(
    scope As OpcTypeSystemScopes,
    fallbackTypeSystem As OpcTypeSystem(Of T))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `scope` | [OpcTypeSystemScopes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystemscopes/) | The [OpcTypeSystemScopes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystemscopes/) the new type system covers. |
| `fallbackTypeSystem` | [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) | The type system used as the fallback system to query type information which is referenced in the new [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) but is not declared. |

## Properties

### FallbackTypeSystem

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

Gets the type system used as the fallback system to query type information which is referenced in the current [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) but is not declared.

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

```csharp
public virtual OpcTypeSystem<T> FallbackTypeSystem { get; }
```

</div>

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

```vbnet
Public Overridable ReadOnly Property FallbackTypeSystem As OpcTypeSystem(Of T)
```

</div>

**Property value**

[OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/)

An instance of the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) class used to query type information which is referenced but not declared within the current [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) or a null reference (Nothing in Visual Basic) if the current [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) is independent from a different type system. Such type systems typically declare types which only reference others declared in the same system as well.

### IsEmpty

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

Gets a value indicating whether the current [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) represents a type system to use if there is no specific type system described.

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

```csharp
public virtual bool IsEmpty { get; }
```

</div>

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

```vbnet
Public Overridable ReadOnly Property IsEmpty As Boolean
```

</div>

**Property value**

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

The value true if the type system does not declare a specific type system; otherwise the value false.

**Implements**

[IsEmpty](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypesystem/members#isempty)

### Scope

Gets the scope of types covered by the current [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/).

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

```csharp
public OpcTypeSystemScopes Scope { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Scope As OpcTypeSystemScopes
```

</div>

**Property value**

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

One of the members defined by the [OpcTypeSystemScopes](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystemscopes/) enumeration.

**Implements**

[Scope](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypesystem/members#scope)

## Methods

### GetType

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

| Overload | Description |
|---|---|
| [GetType(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettype-system-string) | Retrieves the `T` object which is known under the `name` specified. |
| [GetType(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettype-opc-uafx-opcname) | Retrieves the `T` object which is known under the `name` specified. |
| [GetType(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettype-opc-uafx-opcnodeid) | Retrieves the `T` object which declares the type which is identified by the `typeId` specified. |
| [GetType(Type)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettype-system-type) | Retrieves the `T` object which declares the type implemented by the `underlyingType` specified. |

#### GetType(string)

Retrieves the `T` object which is known under the `name` specified.

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

```csharp
public T GetType(string name)
```

</div>

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

```vbnet
Public Function [GetType](name As String) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) to use to identify the `T` object to retrieve. |

**Returns**

T

The `T` object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/members#name) is equals (regarding its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#value)) to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Empty](https://learn.microsoft.com/dotnet/api/system.string.empty). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### GetType(OpcName)

Retrieves the `T` object which is known under the `name` specified.

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

```csharp
public T GetType(OpcName name)
```

</div>

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

```vbnet
Public Function [GetType](name As OpcName) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) of the `T` object to retrieve. |

**Returns**

T

The `T` object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/members#name) is equals to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

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

#### GetType(OpcNodeId)

Retrieves the `T` object which declares the type which is identified by the `typeId` specified.

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

```csharp
public T GetType(OpcNodeId typeId)
```

</div>

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

```vbnet
Public Function [GetType](typeId As OpcNodeId) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies the `T` to retrieve. |

**Returns**

T

The `T` object which is known under the `typeId` specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known `T` object which is associated with the `typeId` specified.

**Exceptions**

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

#### GetType(Type)

Retrieves the `T` object which declares the type implemented by the `underlyingType` specified.

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

```csharp
public T GetType(Type underlyingType)
```

</div>

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

```vbnet
Public Function [GetType](underlyingType As Type) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `underlyingType` | [Type](https://learn.microsoft.com/dotnet/api/system.type) | The [Type](https://learn.microsoft.com/dotnet/api/system.type) which implements the `T` to retrieve. |

**Returns**

T

The `T` object which declares the `underlyingType` specified or a null reference (Nothing in Visual Basic) if there isn't a `T` object associated with the `underlyingType` specified.

**Exceptions**

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

### GetTypeCore

<span class="api-meta">protected · abstract · 4 overloads</span>

| Overload | Description |
|---|---|
| [GetTypeCore(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettypecore-system-string)<span class="api-meta">protected · abstract</span> | Retrieves the `T` object which is known under the `name` specified. |
| [GetTypeCore(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettypecore-opc-uafx-opcname)<span class="api-meta">protected · abstract</span> | Retrieves the `T` object which is known under the `name` specified. |
| [GetTypeCore(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettypecore-opc-uafx-opcnodeid)<span class="api-meta">protected · abstract</span> | Retrieves the `T` object which declares the type which is identified by the `typeId` specified. |
| [GetTypeCore(Type)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/members#gettypecore-system-type)<span class="api-meta">protected · abstract</span> | Retrieves the `T` object which declares the type implemented by the `underlyingType` specified. |

#### GetTypeCore(string)

<span class="api-meta">protected · abstract</span>

Retrieves the `T` object which is known under the `name` specified.

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

```csharp
protected abstract T GetTypeCore(string name)
```

</div>

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

```vbnet
Protected MustOverride Function GetTypeCore(name As String) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) to use to identify the `T` object to retrieve. |

**Returns**

T

The `T` object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/members#name) is equals (regarding its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#value)) to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Remarks**

It is already assured that the passed `name` is not a null reference (Nothing in Visual Basic) nor equals [Empty](https://learn.microsoft.com/dotnet/api/system.string.empty).

#### GetTypeCore(OpcName)

<span class="api-meta">protected · abstract</span>

Retrieves the `T` object which is known under the `name` specified.

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

```csharp
protected abstract T GetTypeCore(OpcName name)
```

</div>

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

```vbnet
Protected MustOverride Function GetTypeCore(name As OpcName) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) of the `T` object to retrieve. |

**Returns**

T

The `T` object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/members#name) is equals to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Remarks**

It is already assured that the passed `name` is not a null reference (Nothing in Visual Basic).

#### GetTypeCore(OpcNodeId)

<span class="api-meta">protected · abstract</span>

Retrieves the `T` object which declares the type which is identified by the `typeId` specified.

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

```csharp
protected abstract T GetTypeCore(OpcNodeId typeId)
```

</div>

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

```vbnet
Protected MustOverride Function GetTypeCore(typeId As OpcNodeId) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies the `T` to retrieve. |

**Returns**

T

The `T` object which is known under the `typeId` specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known `T` object which is associated with the `typeId` specified.

**Remarks**

It is already assured that the passed `typeId` is not a null reference (Nothing in Visual Basic).

#### GetTypeCore(Type)

<span class="api-meta">protected · abstract</span>

Retrieves the `T` object which declares the type implemented by the `underlyingType` specified.

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

```csharp
protected abstract T GetTypeCore(Type underlyingType)
```

</div>

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

```vbnet
Protected MustOverride Function GetTypeCore(underlyingType As Type) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `underlyingType` | [Type](https://learn.microsoft.com/dotnet/api/system.type) | The [Type](https://learn.microsoft.com/dotnet/api/system.type) which implements the `T` to retrieve. |

**Returns**

T

The `T` object which declares the `underlyingType` specified or a null reference (Nothing in Visual Basic) if there isn't a `T` object associated with the `underlyingType` specified.

**Remarks**

It is already assured that the passed `underlyingType` is not a null reference (Nothing in Visual Basic).

### GetTypes

Retrieves all `T` objects offered by the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/).

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

```csharp
public T[] GetTypes()
```

</div>

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

```vbnet
Public Function GetTypes() As T()
```

</div>

**Returns**

T[]

An array that contains all `T` objects that are offered by the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/).

### GetTypesCore

<span class="api-meta">protected · abstract</span>

Retrieves all `T` objects offered by the current [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/) .

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

```csharp
protected abstract T[] GetTypesCore()
```

</div>

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

```vbnet
Protected MustOverride Function GetTypesCore() As T()
```

</div>

**Returns**

T[]

An array that contains all `T` objects that are offered by the [OpcTypeSystem&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctypesystem-1/).
