# OpcNodeIdFactory Members

> Reference: Provides an abstract base class which defines mechanisms to create new OpcNodeId instances.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcNodeIdFactory</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

### OpcNodeIdFactory

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

Initializes a new instance of the [OpcNodeIdFactory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidfactory/) class.

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

```csharp
protected OpcNodeIdFactory()
```

</div>

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

```vbnet
Protected Sub New()
```

</div>

## Methods

### Create

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

| Overload | Description |
|---|---|
| [Create(OpcContext)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidfactory/members#create-opc-uafx-opccontext)<span class="api-meta">abstract</span> | When implemented in a derived class, creates a new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) just using the `context` specified. |
| [Create(OpcContext, OpcNamespace)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidfactory/members#create-opc-uafx-opccontext-opc-uafx-opcnamespace)<span class="api-meta">virtual</span> | Creates a new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) using the `context` and `nodeNamespace` specified. |
| [Create(OpcContext, OpcNamespace, IOpcNodeInfo)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidfactory/members#create-opc-uafx-opccontext-opc-uafx-opcnamespace-opc-uafx-iopcnodeinfo)<span class="api-meta">virtual</span> | Creates a new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) using the `context`, `nodeNamespace` and `node` for that the node identifier is used. |

#### Create(OpcContext)

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

When implemented in a derived class, creates a new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) just using the `context` specified.

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

```csharp
public abstract OpcNodeId Create(OpcContext context)
```

</div>

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

```vbnet
Public MustOverride Function Create(context As OpcContext) As OpcNodeId
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to generate the new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/). |

**Returns**

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

A new instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) class. Although there is by definition a new instance created there is no guarantee that the node identifier is unique. The uniqueness of the identifier depends on the concrete implementation of this method.

#### Create(OpcContext, OpcNamespace)

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

Creates a new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) using the `context` and `nodeNamespace` specified.

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

```csharp
public virtual OpcNodeId Create(OpcContext context, OpcNamespace nodeNamespace)
```

</div>

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

```vbnet
Public Overridable Function Create(
    context As OpcContext,
    nodeNamespace As OpcNamespace) As OpcNodeId
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to generate the new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/). |
| `nodeNamespace` | [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) | The [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) to that the new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) have to refer to. If a null reference (Nothing in Visual Basic) is specified [Default](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/members#default) is used. |

**Returns**

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

A new instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) class. For more details how the node identifier is determined see [Create](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidfactory/members#create-opc-uafx-opccontext). In general the mechanism of defining a node identifier depends on the concrete implementation of this method.

#### Create(OpcContext, OpcNamespace, IOpcNodeInfo)

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

Creates a new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) using the `context`, `nodeNamespace` and `node` for that the node identifier is used.

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

```csharp
public virtual OpcNodeId Create(
    OpcContext context,
    OpcNamespace nodeNamespace,
    IOpcNodeInfo node)
```

</div>

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

```vbnet
Public Overridable Function Create(
    context As OpcContext,
    nodeNamespace As OpcNamespace,
    node As IOpcNodeInfo) As OpcNodeId
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to generate the new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/). |
| `nodeNamespace` | [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) | The [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) to that the new [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) have to refer to. If a null reference (Nothing in Visual Basic) is specified [Default](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/members#default) is used. |
| `node` | [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) | An instance implementing the [IOpcNodeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodeinfo/) interface which represents a preview of the node for which the new node identifier is used. |

**Returns**

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

A new instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) class. For more details how the node identifier is determined see [Create](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeidfactory/members#create-opc-uafx-opccontext). In general the mechanism of defining a node identifier depends on the concrete implementation of this method.
