# OpcEventFilter Members

> Reference: Represents the filter of a monitored item for events, as defined by the EventFilter of OPC UA: the select clauses define the fields to report of each event and the where clause defines the events to report.

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

### OpcEventFilter

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

| Overload | Description |
|---|---|
| [OpcEventFilter(params OpcSimpleAttributeOperand\[\])](#opceventfilter-opc-uafx-opcsimpleattributeoperand-array) | Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `selectClauses` and a where clause which does not restrict the events. |
| [OpcEventFilter(IEnumerable&lt;OpcSimpleAttributeOperand&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/members#opceventfilter-system-collections-generic-ienumerable-of-opc-uafx-opcsimpleattributeoperand) | Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `selectClauses` and a where clause which does not restrict the events. |
| [OpcEventFilter(OpcContentFilter, params OpcSimpleAttributeOperand\[\])](#opceventfilter-opc-uafx-opccontentfilter-opc-uafx-opcsimpleattributeoperand-array) | Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `whereClause` and `selectClauses`. |
| [OpcEventFilter(OpcContentFilter, IEnumerable&lt;OpcSimpleAttributeOperand&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/members#opceventfilter-opc-uafx-opccontentfilter-system-collections-generic-ienumerable-of-opc-uafx-opcsimpleattributeoperand) | Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `whereClause` and `selectClauses`. |

#### OpcEventFilter(params OpcSimpleAttributeOperand\[\])

Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `selectClauses` and a where clause which does not restrict the events.

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

```csharp
public OpcEventFilter(params OpcSimpleAttributeOperand[] selectClauses)
```

</div>

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

```vbnet
Public Sub New(ParamArray selectClauses As OpcSimpleAttributeOperand())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `selectClauses` | params [OpcSimpleAttributeOperand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsimpleattributeoperand/)[] | The operands which select the fields to report of each event. |

**Exceptions**

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

#### OpcEventFilter(IEnumerable&lt;OpcSimpleAttributeOperand&gt;)

Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `selectClauses` and a where clause which does not restrict the events.

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

```csharp
public OpcEventFilter(IEnumerable<OpcSimpleAttributeOperand> selectClauses)
```

</div>

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

```vbnet
Public Sub New(selectClauses As IEnumerable(Of OpcSimpleAttributeOperand))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `selectClauses` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcSimpleAttributeOperand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsimpleattributeoperand/)&gt; | The operands which select the fields to report of each event. |

**Exceptions**

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

#### OpcEventFilter(OpcContentFilter, params OpcSimpleAttributeOperand\[\])

Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `whereClause` and `selectClauses`.

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

```csharp
public OpcEventFilter(
    OpcContentFilter whereClause,
    params OpcSimpleAttributeOperand[] selectClauses)
```

</div>

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

```vbnet
Public Sub New(
    whereClause As OpcContentFilter,
    ParamArray selectClauses As OpcSimpleAttributeOperand())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `whereClause` | [OpcContentFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontentfilter/) | The [OpcContentFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontentfilter/) which defines the events to report. |
| `selectClauses` | params [OpcSimpleAttributeOperand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsimpleattributeoperand/)[] | The operands which select the fields to report of each event. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `whereClause`, the `selectClauses` or one of its elements is a null reference (Nothing in Visual Basic). |

#### OpcEventFilter(OpcContentFilter, IEnumerable&lt;OpcSimpleAttributeOperand&gt;)

Initializes a new instance of the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) class using the specified `whereClause` and `selectClauses`.

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

```csharp
public OpcEventFilter(
    OpcContentFilter whereClause,
    IEnumerable<OpcSimpleAttributeOperand> selectClauses)
```

</div>

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

```vbnet
Public Sub New(
    whereClause As OpcContentFilter,
    selectClauses As IEnumerable(Of OpcSimpleAttributeOperand))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `whereClause` | [OpcContentFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontentfilter/) | The [OpcContentFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontentfilter/) which defines the events to report. |
| `selectClauses` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcSimpleAttributeOperand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsimpleattributeoperand/)&gt; | The operands which select the fields to report of each event. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `whereClause`, the `selectClauses` or one of its elements is a null reference (Nothing in Visual Basic). |

## Properties

### SelectClause

Gets the operands which select the fields to report of each event.

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

```csharp
public OpcSimpleAttributeOperandReadOnlyCollection SelectClause { get; }
```

</div>

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

```vbnet
Public ReadOnly Property SelectClause As OpcSimpleAttributeOperandReadOnlyCollection
```

</div>

**Property value**

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

A read-only collection of the [OpcSimpleAttributeOperand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsimpleattributeoperand/) instances in the order of the fields reported.

### WhereClause

Gets the filter which defines the events to report.

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

```csharp
public OpcContentFilter WhereClause { get; }
```

</div>

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

```vbnet
Public ReadOnly Property WhereClause As OpcContentFilter
```

</div>

**Property value**

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

The [OpcContentFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontentfilter/) which an event has to match to be reported.
