# OpcEventDataView Members

> Reference: Provides immutable access to the filtered event data.

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

## Properties

### EventTypeId

Gets the node identifier identifying the type of event node the data of the view belongs to.

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

```csharp
public OpcNodeId EventTypeId { get; }
```

</div>

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

```vbnet
Public ReadOnly Property EventTypeId As OpcNodeId
```

</div>

**Property value**

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

An instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) in case there the [Filter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/members#filter) not includes type informaton a null reference (Nothing in Visual Basic).

### Filter

Gets the [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) used to gather the data of the view.

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

```csharp
public OpcEventFilter Filter { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Filter As OpcEventFilter
```

</div>

**Property value**

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

The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) which defines the circumstances under which the data has been charged.

## Methods

### Create

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

Creates a new instance of the [OpcEventDataView](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/) using the `context`, `filter` and `data` specified.

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

```csharp
public static OpcEventDataView Create(
    OpcContext context,
    OpcEventFilter filter,
    IEnumerable<object> data)
```

</div>

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

```vbnet
Public Shared Function Create(
    context As OpcContext,
    filter As OpcEventFilter,
    data As IEnumerable(Of Object)) As OpcEventDataView
```

</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 which the new [OpcEventDataView](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/) belongs to. |
| `filter` | [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) | The [OpcEventFilter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/) whose [SelectClause](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventfilter/members#selectclause) defines the order of the `data`. |
| `data` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[Object](https://learn.microsoft.com/dotnet/api/system.object)&gt; | A sequence of [object](https://learn.microsoft.com/dotnet/api/system.object) values in the same order as the select-clause operands of the `filter`. Pass [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for fields that are not available. |

**Returns**

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

A new instance of the [OpcEventDataView](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/) representing the event data of an [OpcEvent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcevent/) instance.

**Exceptions**

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

### Get

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

| Overload | Description |
|---|---|
| [Get&lt;T&gt;(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/members#get-t1-system-string) | Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/members#get-t1-opc-uafx-opcname) | Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcAttribute, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/members#get-t1-opc-uafx-opcattribute-system-string) | Retrieves the value of the `attribute` of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcAttribute, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/members#get-t1-opc-uafx-opcattribute-opc-uafx-opcname) | Retrieves the value of the `attribute` of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcAttribute, params OpcName\[\])](#get-t1-opc-uafx-opcattribute-opc-uafx-opcname-array) | Retrieves the value of the `attribute` of the element browsable through the `pathElements` specified. |
| [Get&lt;T&gt;(OpcAttribute, OpcNamePath)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opceventdataview/members#get-t1-opc-uafx-opcattribute-opc-uafx-opcnamepath) | Retrieves the value of the `attribute` of the element browsable through the `path` specified. |

#### Get&lt;T&gt;(string)

Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified.

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

```csharp
public T Get<T>(string name = "")
```

</div>

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

```vbnet
Public Function [Get](Of T)(name As String = "") As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of the value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) formatted [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) to use to browse to the element from that the requested [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute is to be retrieved. Optional, default `""`. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Implements**

[Get](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-system-string)

#### Get&lt;T&gt;(OpcName)

Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified.

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

```csharp
public T Get<T>(OpcName name)
```

</div>

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

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

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**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/) to use to browse to the element from that the requested [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Implements**

[Get](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcname)

#### Get&lt;T&gt;(OpcAttribute, string)

Retrieves the value of the `attribute` of the element browsable through the `name` specified.

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

```csharp
public T Get<T>(OpcAttribute attribute, string name = "")
```

</div>

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

```vbnet
Public Function [Get](Of T)(attribute As OpcAttribute, name As String = "") As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `name`. |
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) formatted [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) to use to browse to the element from that the requested `attribute` value is to be retrieved. Optional, default `""`. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Implements**

[Get](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcattribute-system-string)

#### Get&lt;T&gt;(OpcAttribute, OpcName)

Retrieves the value of the `attribute` of the element browsable through the `name` specified.

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

```csharp
public T Get<T>(OpcAttribute attribute, OpcName name)
```

</div>

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

```vbnet
Public Function [Get](Of T)(attribute As OpcAttribute, name As OpcName) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `name`. |
| `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/) to use to browse to the element from that the requested `attribute` value is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Implements**

[Get](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcattribute-opc-uafx-opcname)

#### Get&lt;T&gt;(OpcAttribute, params OpcName\[\])

Retrieves the value of the `attribute` of the element browsable through the `pathElements` specified.

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

```csharp
public T Get<T>(OpcAttribute attribute, params OpcName[] pathElements)
```

</div>

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

```vbnet
Public Function [Get](Of T)(
    attribute As OpcAttribute,
    ParamArray pathElements As OpcName()) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `pathElements`. |
| `pathElements` | params [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/)'s to use to browse to the element from that the requested `attribute` value is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Exceptions**

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

**Implements**

[Get](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcattribute-opc-uafx-opcname-array)

#### Get&lt;T&gt;(OpcAttribute, OpcNamePath)

Retrieves the value of the `attribute` of the element browsable through the `path` specified.

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

```csharp
public T Get<T>(OpcAttribute attribute, OpcNamePath path)
```

</div>

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

```vbnet
Public Function [Get](Of T)(attribute As OpcAttribute, path As OpcNamePath) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `path`. |
| `path` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The sequence [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) instances to use to browse to the element from that the requested `attribute` value is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Exceptions**

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

**Implements**

[Get](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcattribute-opc-uafx-opcnamepath)

### ToArray

Copies the elements of this data store to a new array.

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

```csharp
public object[] ToArray()
```

</div>

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

```vbnet
Public Function ToArray() As Object()
```

</div>

**Returns**

[Object](https://learn.microsoft.com/dotnet/api/system.object)[]

An [object](https://learn.microsoft.com/dotnet/api/system.object) array containing copies of the elements of this data store.

**Implements**

[ToArray](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#toarray)
