# OpcOperationContext Members

> Reference: Represents the context of an operation the server performs on behalf of a request of a client.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcOperationContext</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 [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/members).

## Properties

### ClientID

Gets the handle the client has assigned to the request.

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

```csharp
public long ClientID { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ClientID As Long
```

</div>

**Property value**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

The request handle of the client or 0 if the context does not belong to a request.

### Endpoint

Gets the endpoint through which the request has been received.

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

```csharp
public OpcEndpointIdentity Endpoint { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Endpoint As OpcEndpointIdentity
```

</div>

**Property value**

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

The [OpcEndpointIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcendpointidentity/) of the endpoint or a null reference (Nothing in Visual Basic) if the endpoint is not known.

### OperationDeadline

Gets the time by which the operation is to be completed.

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

```csharp
public DateTime OperationDeadline { get; }
```

</div>

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

```vbnet
Public ReadOnly Property OperationDeadline As Date
```

</div>

**Property value**

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

The [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) in UTC derived from the timeout hint of the request or [MaxValue](https://learn.microsoft.com/dotnet/api/system.datetime.maxvalue) if the request specifies no timeout.

### OperationStatus

Gets the status of the operation.

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

```csharp
public OpcStatus OperationStatus { get; }
```

</div>

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

```vbnet
Public ReadOnly Property OperationStatus As OpcStatus
```

</div>

**Property value**

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

The [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) of the operation.

**Remarks**

The status provides the status of the operation at the time the context has been created; later changes by the server are not reflected. Changing the code of the status sets the status of the operation; the server checks it while processing the request and aborts the request if it is bad.

### PreferredLocales

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

Gets a collection of preferred locales (see [Name](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.name)) to use to localize data and information.

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

```csharp
public override OpcLocaleCollection PreferredLocales { get; }
```

</div>

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

```vbnet
Public Overrides ReadOnly Property PreferredLocales As OpcLocaleCollection
```

</div>

**Property value**

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

An instance of the [OpcLocaleCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opclocalecollection/) class with [Name](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.name)s of the cultures to use to localize data and information in order of this [OpcOperationContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcoperationcontext/).

**Overrides**

[PreferredLocales](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/members#preferredlocales)

### RequestId

<span class="api-meta">since v2.7</span>

Gets the identifier the server has assigned to the request.

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

```csharp
public long RequestId { get; }
```

</div>

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

```vbnet
Public ReadOnly Property RequestId As Long
```

</div>

**Property value**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

The identifier of the request or 0 if the context does not belong to a request.

### RequestType

<span class="api-meta">since v2.7</span>

Gets the type of the request.

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

```csharp
public OpcRequestType RequestType { get; }
```

</div>

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

```vbnet
Public ReadOnly Property RequestType As OpcRequestType
```

</div>

**Property value**

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

One of the members defined by the [OpcRequestType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcrequesttype/) enumeration; [Generic](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcrequesttype/#generic) if the context does not belong to a request.

### Session

Gets the session in which the request has been received.

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

```csharp
public OpcSession Session { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Session As OpcSession
```

</div>

**Property value**

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

The [OpcSession](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcsession/) of the request or a null reference (Nothing in Visual Basic) if the request does not belong to a session.

### SessionId

<span class="api-meta">override · since v2.7</span>

Gets the identifier of the session in which the request has been received.

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

```csharp
public override OpcNodeId SessionId { get; }
```

</div>

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

```vbnet
Public Overrides ReadOnly Property SessionId As OpcNodeId
```

</div>

**Property value**

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

The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the session or a null reference (Nothing in Visual Basic) if the request does not belong to a session.

**Overrides**

[SessionId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/members#sessionid)

### Socket

<span class="api-meta">since v2.7</span>

Gets the local and remote endpoints of the connection through which the request has been received.

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

```csharp
public OpcSocketIdentity Socket { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Socket As OpcSocketIdentity
```

</div>

**Property value**

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

The [OpcSocketIdentity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsocketidentity/) of the connection or a null reference (Nothing in Visual Basic) if the endpoints are not known.
