# OpcRequestProcessedEventArgs Members

> Reference: Provides the event data for the RequestProcessed event.

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

### OpcRequestProcessedEventArgs

Initializes a new instance of the [OpcRequestProcessedEventArgs](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcrequestprocessedeventargs/) class using the `context`, `request`, `response` and `exception` specified.

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

```csharp
public OpcRequestProcessedEventArgs(
    OpcContext context,
    IOpcServiceRequest request,
    IOpcServiceResponse response,
    Exception exception)
```

</div>

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

```vbnet
Public Sub New(
    context As OpcContext,
    request As IOpcServiceRequest,
    response As IOpcServiceResponse,
    exception As Exception)
```

</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/) in which the request has been processed. |
| `request` | [IOpcServiceRequest](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcservicerequest/) | The [IOpcServiceRequest](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcservicerequest/) processed. |
| `response` | [IOpcServiceResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponse/) | The [IOpcServiceResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponse/) to the `request`. |
| `exception` | [Exception](https://learn.microsoft.com/dotnet/api/system.exception) | The [Exception](https://learn.microsoft.com/dotnet/api/system.exception) which occurred while processing the request or a null reference (Nothing in Visual Basic) if none occurred. |

**Exceptions**

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

## Properties

### Context

Gets the context in which the request has been processed.

<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 processing.

### Exception

Gets the exception which occurred while processing the request.

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

```csharp
public Exception Exception { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Exception As Exception
```

</div>

**Property value**

[Exception](https://learn.microsoft.com/dotnet/api/system.exception)

The [Exception](https://learn.microsoft.com/dotnet/api/system.exception) which occurred or a null reference (Nothing in Visual Basic) if none occurred. An exception of the underlying stack is provided as an [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/).

### IsUnsupportedService

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

Gets a value indicating whether the request failed because the server does not offer the service requested. A server listening on the discovery port receives such requests from applications which expect a local discovery server there.

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

```csharp
public bool IsUnsupportedService { get; }
```

</div>

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

```vbnet
Public ReadOnly Property IsUnsupportedService As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the request failed with [BadServiceUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badserviceunsupported); otherwise the value false.

### Request

Gets the request processed.

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

```csharp
public IOpcServiceRequest Request { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Request As IOpcServiceRequest
```

</div>

**Property value**

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

The [IOpcServiceRequest](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcservicerequest/) received by the server.

### RequestType

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

Gets the type of the request processed. Unlike the request validation events this value is also known for services the server does not offer.

<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 or [Generic](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcrequesttype/#generic) if the service is not known at all.

### Response

Gets the response to the request.

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

```csharp
public IOpcServiceResponse Response { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Response As IOpcServiceResponse
```

</div>

**Property value**

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

The [IOpcServiceResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponse/) the server sends to the client.
