Skip to content

Reference

OpcRequestValidatingEventArgs Members

Provides the event data for the RequestValidating event.

Reference

OpcRequestValidatingEventArgs Members ​

Type
OpcRequestValidatingEventArgs
Namespace
Opc.UaFx.Server
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Inherits members from EventArgs.

Constructors ​

OpcRequestValidatingEventArgs ​

Initializes a new instance of the OpcRequestValidatingEventArgs class using the context, request, requestType and result specified.

csharp
public OpcRequestValidatingEventArgs(
    OpcContext context,
    IOpcServiceRequest request,
    OpcRequestType requestType,
    OpcResult result)
vbnet
Public Sub New(
    context As OpcContext,
    request As IOpcServiceRequest,
    requestType As OpcRequestType,
    result As OpcResult)

Parameters

NameTypeDescription
contextOpcContextThe OpcContext of the request.
requestIOpcServiceRequestThe IOpcServiceRequest to validate.
requestTypeOpcRequestTypeThe OpcRequestType of the request.
resultOpcResultThe OpcResult of the validation so far.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context, request or result is a null reference (Nothing in Visual Basic).

Remarks

The Cancel property is initialized to true if the result is bad.

Properties ​

Cancel ​

Gets or sets a value indicating whether the request is rejected.

csharp
public bool Cancel { get; set; }
vbnet
Public Property Cancel As Boolean

Property value

Boolean

The value true to reject the request; otherwise the value false. The initial value is true if the Result is bad.

Remarks

The server evaluates only the Result. Setting the value true while the Result is good sets the Result to BadNotSupported. Setting the value false does not change the Result, so that a request whose Result is bad is still rejected.

Context ​

Gets the context of the request.

csharp
public OpcContext Context { get; }
vbnet
Public ReadOnly Property Context As OpcContext

Property value

OpcContext

The OpcContext of the request, an OpcOperationContext.

Request ​

Gets the request to validate.

csharp
public IOpcServiceRequest Request { get; }
vbnet
Public ReadOnly Property Request As IOpcServiceRequest

Property value

IOpcServiceRequest

The IOpcServiceRequest received by the server.

RequestType ​

Gets the type of the request.

csharp
public OpcRequestType RequestType { get; }
vbnet
Public ReadOnly Property RequestType As OpcRequestType

Property value

OpcRequestType

One of the members defined by the OpcRequestType enumeration.

Result ​

Gets or sets the result of the validation.

csharp
public OpcResult Result { get; set; }
vbnet
Public Property Result As OpcResult

Property value

OpcResult

The OpcResult with which the server accepts the request if it is good or rejects the request if it is bad. Initially it is the result of the validation by the server, i.e. of the session, the authentication of the user and the access control.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe value is a null reference (Nothing in Visual Basic).

Remarks

Setting a bad result sets Cancel to true. If an event handler throws an OpcException, the server rejects the request with its result; if it throws another exception, with the code Bad.