Skip to content

Reference

OpcName Members

Represents the name of any kind of OPC UA entity through qualifying its nominal information with a reference to the namespace within the name is used.

Reference

OpcName Members ​

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

Constructors ​

OpcName ​

3 overloads

OverloadDescription
OpcName(string)Initializes a new instance of the OpcName class using the value specified.
OpcName(string, int)Initializes a new instance of the OpcName class using the value and namespaceIndex specified.
OpcName(string, OpcNamespace)Initializes a new instance of the OpcName class using the value and nameNamespace specified.

OpcName(string) ​

Initializes a new instance of the OpcName class using the value specified.

csharp
public OpcName(string value)
vbnet
Public Sub New(value As String)

Parameters

NameTypeDescription
valueStringThe string value of the name to represent. A null reference (Nothing in Visual Basic) or a value equals Empty results into a null name (see IsNull).

OpcName(string, int) ​

Initializes a new instance of the OpcName class using the value and namespaceIndex specified.

csharp
public OpcName(string value, int namespaceIndex)
vbnet
Public Sub New(value As String, namespaceIndex As Integer)

Parameters

NameTypeDescription
valueStringThe string value of the name to represent. A null reference (Nothing in Visual Basic) or a value equals Empty results into a null name (see IsNull).
namespaceIndexInt32The index of the namespace that this name should refer to.

OpcName(string, OpcNamespace) ​

Initializes a new instance of the OpcName class using the value and nameNamespace specified.

csharp
public OpcName(string value, OpcNamespace nameNamespace)
vbnet
Public Sub New(value As String, nameNamespace As OpcNamespace)

Parameters

NameTypeDescription
valueStringThe string value of the name to represent. A null reference (Nothing in Visual Basic) or a value equals Empty results into a null name (see IsNull).
nameNamespaceOpcNamespaceThe namespace that this name should refer to.

Properties ​

IsNull ​

Gets a value indicating whether the name is a null name.

csharp
public bool IsNull { get; }
vbnet
Public ReadOnly Property IsNull As Boolean

Property value

Boolean

The value true if the Value is a null reference (Nothing in Visual Basic) or equals to Empty; otherwise the value false.

Namespace ​

Gets the OpcNamespace used by the OpcName to describe the namespace to that the name belongs.

csharp
public OpcNamespace Namespace { get; }
vbnet
Public ReadOnly Property [Namespace] As OpcNamespace

Property value

OpcNamespace

An instance of the OpcNamespace with the known information about the namespace to that the OpcName belongs.

NamespaceIndex ​

Gets the index of the namespace that this name belongs.

csharp
public int NamespaceIndex { get; }
vbnet
Public ReadOnly Property NamespaceIndex As Integer

Property value

Int32

The index value which refers to the namespace in the namespace array of the server to that the name belong.

Remarks

The available namespaces of the server can be retrieved through reading the value of the namespaces-node using the node identifier 'OpcObjectTypes.Server.Namespaces'.

NamespaceUri ​

Gets the uniform resource identifier (URI) of the namespace referred by the NamespaceIndex.

csharp
public Uri NamespaceUri { get; }
vbnet
Public ReadOnly Property NamespaceUri As Uri

Property value

Uri

The Uri to that the OpcName refers using the NamespaceIndex.

Null ​

static

Gets the default null name.

csharp
public static OpcName Null { get; }
vbnet
Public Shared ReadOnly Property Null As OpcName

Property value

OpcName

An instance of the OpcName which can be used for general purpose in cases there a null name is enough.

Value ​

Gets the name without any namespace information.

csharp
public string Value { get; }
vbnet
Public ReadOnly Property Value As String

Property value

String

The (unqualified) value of the name.

Methods ​

CompareTo ​

2 overloads

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

CompareTo(object) ​

Compares the current OpcName with the other.

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

Parameters

NameTypeDescription
otherObjectThe OpcName to compare with this OpcName.

Returns

Int32

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

Implements

CompareTo(object)

CompareTo(OpcName) ​

Compares the current OpcName with another OpcName.

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

Parameters

NameTypeDescription
otherOpcNameThe OpcName to compare with this OpcName.

Returns

Int32

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

Implements

CompareTo(OpcName)

Equals ​

2 overloads

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

Equals(object) ​

override

Determines whether the specified other is equal to this OpcName.

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

Parameters

NameTypeDescription
otherObjectThe OpcName to compare to the current OpcName.

Returns

Boolean

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

Overrides

Equals(object)

Equals(OpcName) ​

Determines whether the specified other is equal to this OpcName.

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

Parameters

NameTypeDescription
otherOpcNameThe OpcName to compare to the current OpcName.

Returns

Boolean

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

Implements

Equals(OpcName)

GetHashCode ​

override

Retrieves a hash code for this OpcName.

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

Returns

Int32

An int that contains the hash code for the OpcName.

Overrides

GetHashCode()

IsNullOrEmpty ​

static · since v2.14

Indicates whether the specified OpcName is null or its Value is null or an empty string ("").

csharp
public static bool IsNullOrEmpty(OpcName name)
vbnet
Public Shared Function IsNullOrEmpty(name As OpcName) As Boolean

Parameters

NameTypeDescription
nameOpcNameThe OpcName to test.

Returns

Boolean

The value true if the name parameter or its Value is null or an empty string (""); otherwise the value false.

Remarks

This method ignores the circumstance whether the Namespace of the name might be specified anyway.

Parse ​

static

Converts a name string to a OpcName instance.

csharp
public static OpcName Parse(string value)
vbnet
Public Shared Function Parse(value As String) As OpcName

Parameters

NameTypeDescription
valueStringA string that contains a name.

Returns

OpcName

An instance of the OpcName class.

Exceptions

ExceptionCondition
FormatExceptionThe value is not a valid name.

ToString ​

override

Returns a string representing the name.

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

Returns

String

A string formatted with the Value and Namespace of the name.

Overrides

ToString()

TryParse ​

static

Determines whether a string is a valid name.

csharp
public static bool TryParse(string value, out OpcName name)
vbnet
Public Shared Function TryParse(value As String, name As OpcName) As Boolean

Parameters

NameTypeDescription
valueStringThe string to validate.
nameout OpcNameThe OpcName version of the string.

Returns

Boolean

The value true, if value is a valid name; otherwise the value false.

Operators ​

Equality ​

static

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

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

Parameters

NameTypeDescription
leftOpcNameThe first OpcName to compare.
rightOpcNameThe second OpcName to compare.

Returns

Boolean

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

Explicit ​

static

Converts a OpcName to an QualifiedName object.

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

Parameters

NameTypeDescription
valueOpcNameA OpcName that represents the qualified name.

Returns

QualifiedName

An instance of the QualifiedName class initialized from the value.

GreaterThan ​

static

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

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

Parameters

NameTypeDescription
leftOpcNameThe first OpcName object.
rightOpcNameThe second OpcName object.

Returns

Boolean

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

GreaterThanOrEqual ​

static

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

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

Parameters

NameTypeDescription
leftOpcNameThe first OpcName object.
rightOpcNameThe second OpcName object.

Returns

Boolean

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

Implicit ​

static · 2 overloads

OverloadDescription
implicit operator OpcName(string)staticConverts a string to an OpcName object.
implicit operator OpcName(QualifiedName)staticConverts a QualifiedName to an OpcName object.

implicit operator OpcName(string) ​

static

Converts a string to an OpcName object.

csharp
public static implicit operator OpcName(string value)
vbnet
Public Shared Widening Operator CType(value As String) As OpcName

Parameters

NameTypeDescription
valueStringA string that represents the name.

Returns

OpcName

An instance of the OpcName class initialized from the value.

implicit operator OpcName(QualifiedName) ​

static

Converts a QualifiedName to an OpcName object.

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

Parameters

NameTypeDescription
valueQualifiedNameA QualifiedName that represents the name.

Returns

OpcName

An instance of the OpcName class initialized from the value.

Inequality ​

static

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

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

Parameters

NameTypeDescription
leftOpcNameThe first OpcName to compare.
rightOpcNameThe second OpcName 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 OpcName object is less than the second specified OpcName object.

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

Parameters

NameTypeDescription
leftOpcNameThe first OpcName object.
rightOpcNameThe second OpcName 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 OpcName object is less than or equal to the second OpcName object.

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

Parameters

NameTypeDescription
leftOpcNameThe first OpcName object.
rightOpcNameThe second OpcName 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).