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
| Overload | Description |
|---|---|
| OpcResult( | Initializes a new instance of the OpcResult class using the statusCode specified. |
| OpcResult( | Initializes a new instance of the OpcResult class using the statusCode and description specified. |
| OpcResult( | Initializes a new instance of the OpcResult class using the exception specified. |
| OpcResult( | 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.
[CLSCompliant(false)]
public OpcResult(OpcStatusCode statusCode)<CLSCompliant(False)>
Public Sub New(statusCode As OpcStatusCode)Parameters
| Name | Type | Description |
|---|---|---|
statusCode | OpcStatusCode | One 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.
[CLSCompliant(false)]
public OpcResult(OpcStatusCode statusCode, string description)<CLSCompliant(False)>
Public Sub New(statusCode As OpcStatusCode, description As String)Parameters
| Name | Type | Description |
|---|---|---|
statusCode | OpcStatusCode | One of the OpcStatusCode enumeration members identifying the result to represent. |
description | String | The 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.
public OpcResult(Exception exception)Public Sub New(exception As Exception)Parameters
| Name | Type | Description |
|---|---|---|
exception | Exception | The 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.
public OpcResult(Exception exception, string description)Public Sub New(exception As Exception, description As String)Parameters
| Name | Type | Description |
|---|---|---|
exception | Exception | The Exception from that the result information is to be determined. |
description | String | The string which describes the meaning of the exception represented by the result. |
Properties
Addition
Gets additional diagnostic/debugging information associated with the operation which provides the result represented.
public virtual string Addition { get; }Public Overridable ReadOnly Property Addition As StringProperty value
A string representing additional diagnostic/debugging information.
Code
Gets the OpcStatusCode associated with the result.
[CLSCompliant(false)]
public virtual OpcStatusCode Code { get; }<CLSCompliant(False)>
Public Overridable ReadOnly Property Code As OpcStatusCodeProperty value
One of the members defined by the OpcStatusCode enumeration or a custom numeric expression for custom status codes.
Description
Gets the localized description of the result represented.
public virtual OpcText Description { get; }Public Overridable ReadOnly Property Description As OpcTextProperty value
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.
public OpcResult InnerResult { get; }Public ReadOnly Property InnerResult As OpcResultProperty value
An object that describes the result that caused the current result. This value can be a null reference (Nothing in Visual Basic).
IsBad
Gets a value indicating whether the result falls within the category bad.
public virtual bool IsBad { get; }Public Overridable ReadOnly Property IsBad As BooleanProperty value
The value true if the result falls within the category bad; otherwise the value false.
IsGood
Gets a value indicating whether the result falls within the category good.
public virtual bool IsGood { get; }Public Overridable ReadOnly Property IsGood As BooleanProperty value
The value true if the result falls within the category good; otherwise the value false.
IsUncertain
Gets a value indicating whether the result falls within the category uncertain.
public virtual bool IsUncertain { get; }Public Overridable ReadOnly Property IsUncertain As BooleanProperty value
The value true if the result falls within the category uncertain; otherwise the value false.
Methods
CompareTo
| Overload | Description |
|---|---|
| CompareTo( | Compares the current OpcResult with the other. |
| CompareTo( | Compares the current OpcResult with another OpcResult. |
CompareTo(object)
Compares the current OpcResult with the other.
public int CompareTo(object other)Public Function CompareTo(other As Object) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcResult to compare with this OpcResult. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).
Implements
CompareTo(OpcResult)
Compares the current OpcResult with another OpcResult.
public int CompareTo(OpcResult other)Public Function CompareTo(other As OpcResult) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | OpcResult | The OpcResult to compare with this OpcResult. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).
Equals
| Overload | Description |
|---|---|
| Equals( | Determines whether the specified other is equal to this OpcResult. |
| Equals( | Determines whether the specified other is equal to this OpcResult. |
Equals(object)
Determines whether the specified other is equal to this OpcResult.
public override bool Equals(object other)Public Overrides Function Equals(other As Object) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcResult to compare to the current OpcResult. |
Returns
The value true if the specified OpcResult is equal to the current OpcResult; otherwise the value false.
Overrides
Equals(OpcResult)
Determines whether the specified other is equal to this OpcResult.
public bool Equals(OpcResult other)Public Function Equals(other As OpcResult) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | OpcResult | The OpcResult to compare to the current OpcResult. |
Returns
The value true if the specified OpcResult is equal to the current OpcResult; otherwise the value false.
GetBaseResult
Returns the OpcResult that is the root cause of one or more subsequent exceptions.
public OpcResult GetBaseResult()Public Function GetBaseResult() As OpcResultReturns
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
Retrieves a hash code for this OpcResult.
public override int GetHashCode()Public Overrides Function GetHashCode() As IntegerReturns
An int that contains the hash code for the OpcResult.
Overrides
ToString
Returns a string that represents the current OpcResult.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string that represents the current OpcResult including the Code and Description of the result represented.
Overrides
Operators
Equality
Returns a value indicating whether two instance of OpcResult are equal.
public static bool operator ==(OpcResult left, OpcResult right)Public Shared Operator =(left As OpcResult, right As OpcResult) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcResult | The first OpcResult to compare. |
right | OpcResult | The second OpcResult to compare. |
Returns
The value true if left and right are equal; otherwise the value false.
Explicit
Converts a OpcResult to an ServiceResult object.
[CLSCompliant(false)]
public static explicit operator ServiceResult(OpcResult value)<CLSCompliant(False)>
Public Shared Narrowing Operator CType(value As OpcResult) As ServiceResultParameters
| Name | Type | Description |
|---|---|---|
value | OpcResult | A OpcResult that represents the result. |
Returns
ServiceResult
An instance of the ServiceResult class initialized from the value.
GreaterThan
Determines whether the first specified OpcResult object is greater than the second specified OpcResult object.
public static bool operator >(OpcResult left, OpcResult right)Public Shared Operator >(left As OpcResult, right As OpcResult) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcResult | The first OpcResult object. |
right | OpcResult | The second OpcResult object. |
Returns
The value true if left is greater than right; otherwise, false.
GreaterThanOrEqual
Determines whether the first specified OpcResult object is greater than or equal to the second specified OpcResult object.
public static bool operator >=(OpcResult left, OpcResult right)Public Shared Operator >=(left As OpcResult, right As OpcResult) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcResult | The first OpcResult object. |
right | OpcResult | The second OpcResult object. |
Returns
The value true if left is greater than or equal to right; otherwise, false.
Implicit
implicit operator OpcResult(bool)
Converts a bool to an OpcResult object.
public static implicit operator OpcResult(bool value)Public Shared Widening Operator CType(value As Boolean) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Boolean | A bool that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(bool?)
Converts a nullable bool to an OpcResult object.
public static implicit operator OpcResult(bool? value)Public Shared Widening Operator CType(value As Boolean?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Boolean> | A nullable bool that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(byte)
Converts a byte to an OpcResult object.
public static implicit operator OpcResult(byte value)Public Shared Widening Operator CType(value As Byte) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Byte | A byte that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(byte?)
Converts a nullable byte to an OpcResult object.
public static implicit operator OpcResult(byte? value)Public Shared Widening Operator CType(value As Byte?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Byte> | A nullable byte that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(sbyte)
Converts a sbyte to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(sbyte value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | SByte | A sbyte that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(sbyte?)
Converts a nullable sbyte to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(sbyte? value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<SByte> | A nullable sbyte that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(decimal)
Converts a decimal to an OpcResult object.
public static implicit operator OpcResult(decimal value)Public Shared Widening Operator CType(value As Decimal) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Decimal | A decimal that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(decimal?)
Converts a nullable decimal to an OpcResult object.
public static implicit operator OpcResult(decimal? value)Public Shared Widening Operator CType(value As Decimal?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Decimal> | A nullable decimal that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(double)
Converts a double to an OpcResult object.
public static implicit operator OpcResult(double value)Public Shared Widening Operator CType(value As Double) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Double | A double that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(double?)
Converts a nullable double to an OpcResult object.
public static implicit operator OpcResult(double? value)Public Shared Widening Operator CType(value As Double?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Double> | A nullable double that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(float)
Converts a float to an OpcResult object.
public static implicit operator OpcResult(float value)Public Shared Widening Operator CType(value As Single) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Single | A float that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(float?)
Converts a nullable float to an OpcResult object.
public static implicit operator OpcResult(float? value)Public Shared Widening Operator CType(value As Single?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Single> | A nullable float that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(int)
Converts a int to an OpcResult object.
public static implicit operator OpcResult(int value)Public Shared Widening Operator CType(value As Integer) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Int32 | A int that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(int?)
Converts a nullable int to an OpcResult object.
public static implicit operator OpcResult(int? value)Public Shared Widening Operator CType(value As Integer?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Int32> | A nullable int that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(uint)
Converts a uint to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(uint value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | UInt32 | A uint that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(uint?)
Converts a nullable uint to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(uint? value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<UInt32> | A nullable uint that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(long)
Converts a long to an OpcResult object.
public static implicit operator OpcResult(long value)Public Shared Widening Operator CType(value As Long) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Int64 | A long that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(long?)
Converts a nullable long to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(long? value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As Long?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Int64> | A nullable long that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(ulong)
Converts a ulong to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(ulong value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | UInt64 | A ulong that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(ulong?)
Converts a nullable ulong to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(ulong? value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<UInt64> | A nullable ulong that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(short)
Converts a short to an OpcResult object.
public static implicit operator OpcResult(short value)Public Shared Widening Operator CType(value As Short) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Int16 | A short that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(short?)
Converts a nullable short to an OpcResult object.
public static implicit operator OpcResult(short? value)Public Shared Widening Operator CType(value As Short?) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | Nullable<Int16> | A nullable short that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(ushort)
Converts a ushort to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(ushort value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UShort) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | UInt16 | A ushort that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(OpcStatus)
Converts a OpcStatus to an OpcResult object.
public static implicit operator OpcResult(OpcStatus value)Public Shared Widening Operator CType(value As OpcStatus) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | OpcStatus | A OpcStatus that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(OpcStatusCode)
Converts a OpcStatusCode to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(OpcStatusCode value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As OpcStatusCode) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | OpcStatusCode | A OpcStatusCode that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(StatusCode)
Converts a StatusCode to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(StatusCode value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As StatusCode) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | StatusCode | A StatusCode that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
implicit operator OpcResult(ServiceResult)
Converts a ServiceResult to an OpcResult object.
[CLSCompliant(false)]
public static implicit operator OpcResult(ServiceResult value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ServiceResult) As OpcResultParameters
| Name | Type | Description |
|---|---|---|
value | ServiceResult | A ServiceResult that represents the result. |
Returns
An instance of the OpcResult class initialized from the value.
Inequality
Returns a value indicating whether two instances of OpcResult are not equal.
public static bool operator !=(OpcResult left, OpcResult right)Public Shared Operator <>(left As OpcResult, right As OpcResult) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcResult | The first OpcResult to compare. |
right | OpcResult | The second OpcResult to compare. |
Returns
The value true if left and right are not equal; otherwise the value false.
LessThan
Determines whether the first specified OpcResult object is less than the second specified OpcResult object.
public static bool operator <(OpcResult left, OpcResult right)Public Shared Operator <(left As OpcResult, right As OpcResult) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcResult | The first OpcResult object. |
right | OpcResult | The second OpcResult object. |
Returns
The value true if left is less than right; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The left is a null reference ( |
LessThanOrEqual
Determines whether the first specified OpcResult object is less than or equal to the second OpcResult object.
public static bool operator <=(OpcResult left, OpcResult right)Public Shared Operator <=(left As OpcResult, right As OpcResult) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcResult | The first OpcResult object. |
right | OpcResult | The second OpcResult object. |
Returns
The value true if left is less than or equal to right; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The left is a null reference ( |

