# IOpcRegisterNodesService Members

> Reference: Defines a specialized IOpcService<TResponse, TRequest> which can be used to register one or more nodes for optimized node access.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcRegisterNodesService</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.services">Opc.UaFx.Services</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>

Inherits members from [IOpcService&lt;OpcRegisterNodesResponse, OpcRegisterNodesRequest&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcservice-2/members).

## Methods

### RegisterNodes

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

| Overload | Description |
|---|---|
| [RegisterNodes(IEnumerable&lt;OpcRegisterNode&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcregisternodesservice/members#registernodes-system-collections-generic-ienumerable-of-opc-uafx-opcregisternode) | Registers one or more nodes for optimized node access using the specified `commands`. |
| [RegisterNodes(params OpcRegisterNode\[\])](#registernodes-opc-uafx-opcregisternode-array) | Registers one or more nodes for optimized node access using the specified `commands`. |

**Known results:** [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid)

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` sequence or one of its items is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The register nodes service is currently not supported, especially using the `commands` specified. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo) and [BadTooManyMatches](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymatches). |

#### RegisterNodes(IEnumerable&lt;OpcRegisterNode&gt;)

Registers one or more nodes for optimized node access using the specified `commands`.

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

```csharp
OpcNodeIdCollection RegisterNodes(IEnumerable<OpcRegisterNode> commands)
```

</div>

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

```vbnet
Function RegisterNodes(
    commands As IEnumerable(Of OpcRegisterNode)) As OpcNodeIdCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcRegisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcregisternode/)&gt; | A sequence of [OpcRegisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcregisternode/) instances to process. |

**Returns**

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

A collection of [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) instances its number and order of items matches the number and order of items in the `commands` sequence. There is for each command one entry which stores the node identifier requested by that command to use to access the node registered for optimized node access.

**Remarks**

Servers completely reject register nodes requests if any of the node identifiers passed are structurally invalid.

#### RegisterNodes(params OpcRegisterNode\[\])

Registers one or more nodes for optimized node access using the specified `commands`.

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

```csharp
OpcNodeIdCollection RegisterNodes(params OpcRegisterNode[] commands)
```

</div>

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

```vbnet
Function RegisterNodes(
    ParamArray commands As OpcRegisterNode()) As OpcNodeIdCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | params [OpcRegisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcregisternode/)[] | An array of of [OpcRegisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcregisternode/) instances to process. |

**Returns**

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

A collection of [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) instances its number and order of items matches the number and order of items in the `commands` sequence. There is for each command one entry which stores the node identifier requested by that command to use to access the node registered for optimized node access.

**Remarks**

Servers completely reject register nodes requests if any of the node identifiers passed are structurally invalid.
