Skip to content

Reference

OpcResult Members

Provides information indicating and describing the outcome of an operation.

Reference

OpcResult Members ​

Type
OpcResult
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Constructors ​

OpcResult ​

4 overloads

OverloadDescription
OpcResult(OpcStatusCode)Initializes a new instance of the OpcResult class using the statusCode specified.
OpcResult(OpcStatusCode, string)Initializes a new instance of the OpcResult class using the statusCode and description specified.
OpcResult(Exception)Initializes a new instance of the OpcResult class using the exception specified.
OpcResult(Exception, string)Initializes a new instance of the OpcResult class using the exception and description specified.

OpcResult(OpcStatusCode) ​

Initializes a new instance of the OpcResult class using the statusCode specified.

csharp
[CLSCompliant(false)]
public OpcResult(OpcStatusCode statusCode)
vbnet
<CLSCompliant(False)>
Public Sub New(statusCode As OpcStatusCode)

Parameters

NameTypeDescription
statusCodeOpcStatusCodeOne of the OpcStatusCode enumeration members identifying the result to represent.

OpcResult(OpcStatusCode, string) ​

Initializes a new instance of the OpcResult class using the statusCode and description specified.

csharp
[CLSCompliant(false)]
public OpcResult(OpcStatusCode statusCode, string description)
vbnet
<CLSCompliant(False)>
Public Sub New(statusCode As OpcStatusCode, description As String)

Parameters

NameTypeDescription
statusCodeOpcStatusCodeOne of the OpcStatusCode enumeration members identifying the result to represent.
descriptionStringThe string which describes the meaning of the statusCode represented by the result.

OpcResult(Exception) ​

Initializes a new instance of the OpcResult class using the exception specified.

csharp
public OpcResult(Exception exception)
vbnet
Public Sub New(exception As Exception)

Parameters

NameTypeDescription
exceptionExceptionThe Exception from that the result information is to be determined.

Remarks

An OpcResult constructed from an Exception does always define the Bad as Code. Only in case there Exception does define a OpcException the Code may depend on the contents of the exception.

OpcResult(Exception, string) ​

Initializes a new instance of the OpcResult class using the exception and description specified.

csharp
public OpcResult(Exception exception, string description)
vbnet
Public Sub New(exception As Exception, description As String)

Parameters

NameTypeDescription
exceptionExceptionThe Exception from that the result information is to be determined.
descriptionStringThe string which describes the meaning of the exception represented by the result.

Properties ​

Addition ​

virtual

Gets additional diagnostic/debugging information associated with the operation which provides the result represented.

csharp
public virtual string Addition { get; }
vbnet
Public Overridable ReadOnly Property Addition As String

Property value

String

A string representing additional diagnostic/debugging information.

Code ​

virtual

Gets the OpcStatusCode associated with the result.

csharp
[CLSCompliant(false)]
public virtual OpcStatusCode Code { get; }
vbnet
<CLSCompliant(False)>
Public Overridable ReadOnly Property Code As OpcStatusCode

Property value

OpcStatusCode

One of the members defined by the OpcStatusCode enumeration or a custom numeric expression for custom status codes.

Description ​

virtual

Gets the localized description of the result represented.

csharp
public virtual OpcText Description { get; }
vbnet
Public Overridable ReadOnly Property Description As OpcText

Property value

OpcText

The localized description from that the result has been created if neither a null reference (Nothing in Visual Basic) nor empty; otherwise the description associated with the Code.

InnerResult ​

Gets the OpcResult instance that caused the current result.

csharp
public OpcResult InnerResult { get; }
vbnet
Public ReadOnly Property InnerResult As OpcResult

Property value

OpcResult

An object that describes the result that caused the current result. This value can be a null reference (Nothing in Visual Basic).

IsBad ​

virtual

Gets a value indicating whether the result falls within the category bad.

csharp
public virtual bool IsBad { get; }
vbnet
Public Overridable ReadOnly Property IsBad As Boolean

Property value

Boolean

The value true if the result falls within the category bad; otherwise the value false.

IsGood ​

virtual

Gets a value indicating whether the result falls within the category good.

csharp
public virtual bool IsGood { get; }
vbnet
Public Overridable ReadOnly Property IsGood As Boolean

Property value

Boolean

The value true if the result falls within the category good; otherwise the value false.

IsUncertain ​

virtual

Gets a value indicating whether the result falls within the category uncertain.

csharp
public virtual bool IsUncertain { get; }
vbnet
Public Overridable ReadOnly Property IsUncertain As Boolean

Property value

Boolean

The value true if the result falls within the category uncertain; otherwise the value false.

Methods ​

CompareTo ​

2 overloads

OverloadDescription
CompareTo(object)Compares the current OpcResult with the other.
CompareTo(OpcResult)Compares the current OpcResult with another OpcResult.

CompareTo(object) ​

Compares the current OpcResult with the other.

csharp
public int CompareTo(object other)
vbnet
Public Function CompareTo(other As Object) As Integer

Parameters

NameTypeDescription
otherObjectThe OpcResult to compare with this OpcResult.

Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).

Implements

CompareTo(object)

CompareTo(OpcResult) ​

Compares the current OpcResult with another OpcResult.

csharp
public int CompareTo(OpcResult other)
vbnet
Public Function CompareTo(other As OpcResult) As Integer

Parameters

NameTypeDescription
otherOpcResultThe OpcResult to compare with this OpcResult.

Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).

Equals ​

2 overloads

OverloadDescription
Equals(object)overrideDetermines whether the specified other is equal to this OpcResult.
Equals(OpcResult)Determines whether the specified other is equal to this OpcResult.

Equals(object) ​

override

Determines whether the specified other is equal to this OpcResult.

csharp
public override bool Equals(object other)
vbnet
Public Overrides Function Equals(other As Object) As Boolean

Parameters

NameTypeDescription
otherObjectThe OpcResult to compare to the current OpcResult.

Returns

Boolean

The value true if the specified OpcResult is equal to the current OpcResult; otherwise the value false.

Overrides

Equals(object)

Equals(OpcResult) ​

Determines whether the specified other is equal to this OpcResult.

csharp
public bool Equals(OpcResult other)
vbnet
Public Function Equals(other As OpcResult) As Boolean

Parameters

NameTypeDescription
otherOpcResultThe OpcResult to compare to the current OpcResult.

Returns

Boolean

The value true if the specified OpcResult is equal to the current OpcResult; otherwise the value false.

GetBaseResult ​

since v2.8

Returns the OpcResult that is the root cause of one or more subsequent exceptions.

csharp
public OpcResult GetBaseResult()
vbnet
Public Function GetBaseResult() As OpcResult

Returns

OpcResult

The first result captured in a chain of results. If the InnerResult property of the current result is a null reference (Nothing in Visual Basic), this method returns the current result.

GetHashCode ​

override

Retrieves a hash code for this OpcResult.

csharp
public override int GetHashCode()
vbnet
Public Overrides Function GetHashCode() As Integer

Returns

Int32

An int that contains the hash code for the OpcResult.

Overrides

GetHashCode()

ToString ​

override

Returns a string that represents the current OpcResult.

csharp
public override string ToString()
vbnet
Public Overrides Function ToString() As String

Returns

String

A string that represents the current OpcResult including the Code and Description of the result represented.

Overrides

ToString()

Operators ​

Equality ​

static

Returns a value indicating whether two instance of OpcResult are equal.

csharp
public static bool operator ==(OpcResult left, OpcResult right)
vbnet
Public Shared Operator =(left As OpcResult, right As OpcResult) As Boolean

Parameters

NameTypeDescription
leftOpcResultThe first OpcResult to compare.
rightOpcResultThe second OpcResult to compare.

Returns

Boolean

The value true if left and right are equal; otherwise the value false.

Explicit ​

static

Converts a OpcResult to an ServiceResult object.

csharp
[CLSCompliant(false)]
public static explicit operator ServiceResult(OpcResult value)
vbnet
<CLSCompliant(False)>
Public Shared Narrowing Operator CType(value As OpcResult) As ServiceResult

Parameters

NameTypeDescription
valueOpcResultA OpcResult that represents the result.

Returns

ServiceResult

An instance of the ServiceResult class initialized from the value.

GreaterThan ​

static

Determines whether the first specified OpcResult object is greater than the second specified OpcResult object.

csharp
public static bool operator >(OpcResult left, OpcResult right)
vbnet
Public Shared Operator >(left As OpcResult, right As OpcResult) As Boolean

Parameters

NameTypeDescription
leftOpcResultThe first OpcResult object.
rightOpcResultThe second OpcResult object.

Returns

Boolean

The value true if left is greater than right; otherwise, false.

GreaterThanOrEqual ​

static

Determines whether the first specified OpcResult object is greater than or equal to the second specified OpcResult object.

csharp
public static bool operator >=(OpcResult left, OpcResult right)
vbnet
Public Shared Operator >=(left As OpcResult, right As OpcResult) As Boolean

Parameters

NameTypeDescription
leftOpcResultThe first OpcResult object.
rightOpcResultThe second OpcResult object.

Returns

Boolean

The value true if left is greater than or equal to right; otherwise, false.

Implicit ​

static · 27 overloads

OverloadDescription
implicit operator OpcResult(bool)staticConverts a bool to an OpcResult object.
implicit operator OpcResult(bool?)staticConverts a nullable bool to an OpcResult object.
implicit operator OpcResult(byte)staticConverts a byte to an OpcResult object.
implicit operator OpcResult(byte?)staticConverts a nullable byte to an OpcResult object.
implicit operator OpcResult(sbyte)staticConverts a sbyte to an OpcResult object.
implicit operator OpcResult(sbyte?)staticConverts a nullable sbyte to an OpcResult object.
implicit operator OpcResult(decimal)staticConverts a decimal to an OpcResult object.
implicit operator OpcResult(decimal?)staticConverts a nullable decimal to an OpcResult object.
implicit operator OpcResult(double)staticConverts a double to an OpcResult object.
implicit operator OpcResult(double?)staticConverts a nullable double to an OpcResult object.
implicit operator OpcResult(float)staticConverts a float to an OpcResult object.
implicit operator OpcResult(float?)staticConverts a nullable float to an OpcResult object.
implicit operator OpcResult(int)staticConverts a int to an OpcResult object.
implicit operator OpcResult(int?)staticConverts a nullable int to an OpcResult object.
implicit operator OpcResult(uint)staticConverts a uint to an OpcResult object.
implicit operator OpcResult(uint?)staticConverts a nullable uint to an OpcResult object.
implicit operator OpcResult(long)staticConverts a long to an OpcResult object.
implicit operator OpcResult(long?)staticConverts a nullable long to an OpcResult object.
implicit operator OpcResult(ulong)staticConverts a ulong to an OpcResult object.
implicit operator OpcResult(ulong?)staticConverts a nullable ulong to an OpcResult object.
implicit operator OpcResult(short)staticConverts a short to an OpcResult object.
implicit operator OpcResult(short?)staticConverts a nullable short to an OpcResult object.
implicit operator OpcResult(ushort)staticConverts a ushort to an OpcResult object.
implicit operator OpcResult(OpcStatus)staticConverts a OpcStatus to an OpcResult object.
implicit operator OpcResult(OpcStatusCode)staticConverts a OpcStatusCode to an OpcResult object.
implicit operator OpcResult(StatusCode)staticConverts a StatusCode to an OpcResult object.
implicit operator OpcResult(ServiceResult)staticConverts a ServiceResult to an OpcResult object.

implicit operator OpcResult(bool) ​

static

Converts a bool to an OpcResult object.

csharp
public static implicit operator OpcResult(bool value)
vbnet
Public Shared Widening Operator CType(value As Boolean) As OpcResult

Parameters

NameTypeDescription
valueBooleanA bool that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(bool?) ​

static

Converts a nullable bool to an OpcResult object.

csharp
public static implicit operator OpcResult(bool? value)
vbnet
Public Shared Widening Operator CType(value As Boolean?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Boolean>A nullable bool that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(byte) ​

static

Converts a byte to an OpcResult object.

csharp
public static implicit operator OpcResult(byte value)
vbnet
Public Shared Widening Operator CType(value As Byte) As OpcResult

Parameters

NameTypeDescription
valueByteA byte that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(byte?) ​

static

Converts a nullable byte to an OpcResult object.

csharp
public static implicit operator OpcResult(byte? value)
vbnet
Public Shared Widening Operator CType(value As Byte?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Byte>A nullable byte that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(sbyte) ​

static

Converts a sbyte to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(sbyte value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte) As OpcResult

Parameters

NameTypeDescription
valueSByteA sbyte that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(sbyte?) ​

static

Converts a nullable sbyte to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(sbyte? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte?) As OpcResult

Parameters

NameTypeDescription
valueNullable<SByte>A nullable sbyte that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(decimal) ​

static

Converts a decimal to an OpcResult object.

csharp
public static implicit operator OpcResult(decimal value)
vbnet
Public Shared Widening Operator CType(value As Decimal) As OpcResult

Parameters

NameTypeDescription
valueDecimalA decimal that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(decimal?) ​

static

Converts a nullable decimal to an OpcResult object.

csharp
public static implicit operator OpcResult(decimal? value)
vbnet
Public Shared Widening Operator CType(value As Decimal?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Decimal>A nullable decimal that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(double) ​

static

Converts a double to an OpcResult object.

csharp
public static implicit operator OpcResult(double value)
vbnet
Public Shared Widening Operator CType(value As Double) As OpcResult

Parameters

NameTypeDescription
valueDoubleA double that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(double?) ​

static

Converts a nullable double to an OpcResult object.

csharp
public static implicit operator OpcResult(double? value)
vbnet
Public Shared Widening Operator CType(value As Double?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Double>A nullable double that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(float) ​

static

Converts a float to an OpcResult object.

csharp
public static implicit operator OpcResult(float value)
vbnet
Public Shared Widening Operator CType(value As Single) As OpcResult

Parameters

NameTypeDescription
valueSingleA float that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(float?) ​

static

Converts a nullable float to an OpcResult object.

csharp
public static implicit operator OpcResult(float? value)
vbnet
Public Shared Widening Operator CType(value As Single?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Single>A nullable float that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(int) ​

static

Converts a int to an OpcResult object.

csharp
public static implicit operator OpcResult(int value)
vbnet
Public Shared Widening Operator CType(value As Integer) As OpcResult

Parameters

NameTypeDescription
valueInt32A int that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(int?) ​

static

Converts a nullable int to an OpcResult object.

csharp
public static implicit operator OpcResult(int? value)
vbnet
Public Shared Widening Operator CType(value As Integer?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Int32>A nullable int that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(uint) ​

static

Converts a uint to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(uint value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger) As OpcResult

Parameters

NameTypeDescription
valueUInt32A uint that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(uint?) ​

static

Converts a nullable uint to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(uint? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger?) As OpcResult

Parameters

NameTypeDescription
valueNullable<UInt32>A nullable uint that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(long) ​

static

Converts a long to an OpcResult object.

csharp
public static implicit operator OpcResult(long value)
vbnet
Public Shared Widening Operator CType(value As Long) As OpcResult

Parameters

NameTypeDescription
valueInt64A long that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(long?) ​

static

Converts a nullable long to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(long? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As Long?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Int64>A nullable long that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(ulong) ​

static

Converts a ulong to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(ulong value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong) As OpcResult

Parameters

NameTypeDescription
valueUInt64A ulong that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(ulong?) ​

static

Converts a nullable ulong to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(ulong? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong?) As OpcResult

Parameters

NameTypeDescription
valueNullable<UInt64>A nullable ulong that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(short) ​

static

Converts a short to an OpcResult object.

csharp
public static implicit operator OpcResult(short value)
vbnet
Public Shared Widening Operator CType(value As Short) As OpcResult

Parameters

NameTypeDescription
valueInt16A short that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(short?) ​

static

Converts a nullable short to an OpcResult object.

csharp
public static implicit operator OpcResult(short? value)
vbnet
Public Shared Widening Operator CType(value As Short?) As OpcResult

Parameters

NameTypeDescription
valueNullable<Int16>A nullable short that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(ushort) ​

static

Converts a ushort to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(ushort value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UShort) As OpcResult

Parameters

NameTypeDescription
valueUInt16A ushort that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(OpcStatus) ​

static

Converts a OpcStatus to an OpcResult object.

csharp
public static implicit operator OpcResult(OpcStatus value)
vbnet
Public Shared Widening Operator CType(value As OpcStatus) As OpcResult

Parameters

NameTypeDescription
valueOpcStatusA OpcStatus that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(OpcStatusCode) ​

static

Converts a OpcStatusCode to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(OpcStatusCode value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As OpcStatusCode) As OpcResult

Parameters

NameTypeDescription
valueOpcStatusCodeA OpcStatusCode that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(StatusCode) ​

static

Converts a StatusCode to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(StatusCode value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As StatusCode) As OpcResult

Parameters

NameTypeDescription
valueStatusCodeA StatusCode that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

implicit operator OpcResult(ServiceResult) ​

static

Converts a ServiceResult to an OpcResult object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcResult(ServiceResult value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ServiceResult) As OpcResult

Parameters

NameTypeDescription
valueServiceResultA ServiceResult that represents the result.

Returns

OpcResult

An instance of the OpcResult class initialized from the value.

Inequality ​

static

Returns a value indicating whether two instances of OpcResult are not equal.

csharp
public static bool operator !=(OpcResult left, OpcResult right)
vbnet
Public Shared Operator <>(left As OpcResult, right As OpcResult) As Boolean

Parameters

NameTypeDescription
leftOpcResultThe first OpcResult to compare.
rightOpcResultThe second OpcResult to compare.

Returns

Boolean

The value true if left and right are not equal; otherwise the value false.

LessThan ​

static

Determines whether the first specified OpcResult object is less than the second specified OpcResult object.

csharp
public static bool operator <(OpcResult left, OpcResult right)
vbnet
Public Shared Operator <(left As OpcResult, right As OpcResult) As Boolean

Parameters

NameTypeDescription
leftOpcResultThe first OpcResult object.
rightOpcResultThe second OpcResult object.

Returns

Boolean

The value true if left is less than right; otherwise the value false.

Exceptions

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

LessThanOrEqual ​

static

Determines whether the first specified OpcResult object is less than or equal to the second OpcResult object.

csharp
public static bool operator <=(OpcResult left, OpcResult right)
vbnet
Public Shared Operator <=(left As OpcResult, right As OpcResult) As Boolean

Parameters

NameTypeDescription
leftOpcResultThe first OpcResult object.
rightOpcResultThe second OpcResult object.

Returns

Boolean

The value true if left is less than or equal to right; otherwise the value false.

Exceptions

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