# OpcConditionNodeExtension Members

> Reference: Provides static (Shared in Visual Basic) extension methods to manage OpcConditionNode objects.

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

## Methods

### AddComment

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

| Overload | Description |
|---|---|
| [AddComment(OpcConditionNode, OpcClient, OpcText)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcconditionnodeextension/members#addcomment-opc-uafx-opcconditionnode-opc-uafx-client-opcclient-opc-uafx-opctext)<span class="api-meta">static</span> | Applies a comment to the state reported by an event notification which can be identified by the [EventId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventnode/members#eventid) of the `conditionNode` specified using the further specified `client`. |
| [AddComment(OpcConditionNode, OpcClient, byte\[\], OpcText)](#addcomment-opc-uafx-opcconditionnode-opc-uafx-client-opcclient-system-byte-array-opc-uafx-opctext)<span class="api-meta">static</span> | Applies a comment to the state reported by an event notification which can be identified by the `eventId` on the `conditionNode` specified using the further specified `client`. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The call of the method node failed (see exception details for more information). |

#### AddComment(OpcConditionNode, OpcClient, OpcText)

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

Applies a comment to the state reported by an event notification which can be identified by the [EventId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventnode/members#eventid) of the `conditionNode` specified using the further specified `client`.

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

```csharp
public static void AddComment(
    this OpcConditionNode conditionNode,
    OpcClient client,
    OpcText comment)
```

</div>

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

```vbnet
Public Shared Sub AddComment(
    conditionNode As OpcConditionNode,
    client As OpcClient,
    comment As OpcText)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `conditionNode` | [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) | The [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) its 'AddComment' method node is to be called. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to call the method. |
| `comment` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The text to apply on the condition state. |

**Exceptions**

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

#### AddComment(OpcConditionNode, OpcClient, byte\[\], OpcText)

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

Applies a comment to the state reported by an event notification which can be identified by the `eventId` on the `conditionNode` specified using the further specified `client`.

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

```csharp
public static void AddComment(
    this OpcConditionNode conditionNode,
    OpcClient client,
    byte[] eventId,
    OpcText comment)
```

</div>

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

```vbnet
Public Shared Sub AddComment(
    conditionNode As OpcConditionNode,
    client As OpcClient,
    eventId As Byte(),
    comment As OpcText)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `conditionNode` | [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) | The [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) its 'AddComment' method node is to be called. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to call the method. |
| `eventId` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The identifier which identifies the particular event notification its reported state for the `conditionNode` is to be commented. |
| `comment` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The text to apply on the condition state. |

**Exceptions**

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

### Disable

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

Changes the condition state to 'Disabled' of the `conditionNode` specified using the further specified `client`.

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

```csharp
public static void Disable(
    this OpcConditionNode conditionNode,
    OpcClient client)
```

</div>

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

```vbnet
Public Shared Sub Disable(
    conditionNode As OpcConditionNode,
    client As OpcClient)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `conditionNode` | [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) | The [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) its 'Disable' method node is to be called. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to call the method. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `conditionNode` or `client` is a null reference (Nothing in Visual Basic). |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The call of the method node failed (see exception details for more information). |

### Enable

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

Changes the condition state to 'Enabled' of the `conditionNode` specified using the further specified `client`.

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

```csharp
public static void Enable(this OpcConditionNode conditionNode, OpcClient client)
```

</div>

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

```vbnet
Public Shared Sub Enable(conditionNode As OpcConditionNode, client As OpcClient)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `conditionNode` | [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) | The [OpcConditionNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcconditionnode/) its 'Enable' method node is to be called. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to call the method. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `conditionNode` or `client` is a null reference (Nothing in Visual Basic). |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The call of the method node failed (see exception details for more information). |
