# OpcNodeAccessEventArgs Members

> Reference: Provides the event data for the events BeforeRead, AfterRead, BeforeWrite and AfterWrite.

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

Inherits members from [EventArgs](https://learn.microsoft.com/dotnet/api/system.eventargs).

## Constructors

### OpcNodeAccessEventArgs

Initializes a new instance of the [OpcNodeAccessEventArgs](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodeaccesseventargs/) class using the `context` and `tokens` specified.

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

```csharp
public OpcNodeAccessEventArgs(
    OpcContext context,
    OpcNodeAccessTokenCollection tokens)
```

</div>

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

```vbnet
Public Sub New(context As OpcContext, tokens As OpcNodeAccessTokenCollection)
```

</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/) of the read or write operation. |
| `tokens` | [OpcNodeAccessTokenCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodeaccesstokencollection/) | The [OpcNodeAccessTokenCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodeaccesstokencollection/) with one [OpcNodeAccessToken](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodeaccesstoken/) per attribute value to read or to write. |

**Exceptions**

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

## Properties

### Context

Gets the context of the read or write operation.

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

```csharp
public OpcContext Context { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Context As OpcContext
```

</div>

**Property value**

[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/) of the operation.

### Tokens

Gets the tokens of the attribute values to read or to write.

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

```csharp
public OpcNodeAccessTokenCollection Tokens { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Tokens As OpcNodeAccessTokenCollection
```

</div>

**Property value**

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

The [OpcNodeAccessTokenCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodeaccesstokencollection/) with one [OpcNodeAccessToken](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodeaccesstoken/) per attribute value. After reading or writing, the tokens provide the results.
