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
| Overload | Description |
|---|---|
| OpcName( | Initializes a new instance of the OpcName class using the value specified. |
| OpcName( | Initializes a new instance of the OpcName class using the value and namespaceIndex specified. |
| OpcName( | 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.
public OpcName(string value)Public Sub New(value As String)Parameters
| Name | Type | Description |
|---|---|---|
value | String | The string value of the name to represent. A null reference ( |
OpcName(string, int)
Initializes a new instance of the OpcName class using the value and namespaceIndex specified.
public OpcName(string value, int namespaceIndex)Public Sub New(value As String, namespaceIndex As Integer)Parameters
| Name | Type | Description |
|---|---|---|
value | String | The string value of the name to represent. A null reference ( |
namespaceIndex | Int32 | The 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.
public OpcName(string value, OpcNamespace nameNamespace)Public Sub New(value As String, nameNamespace As OpcNamespace)Parameters
| Name | Type | Description |
|---|---|---|
value | String | The string value of the name to represent. A null reference ( |
nameNamespace | OpcNamespace | The namespace that this name should refer to. |
Properties
IsNull
Gets a value indicating whether the name is a null name.
public bool IsNull { get; }Public ReadOnly Property IsNull As BooleanProperty value
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.
public OpcNamespace Namespace { get; }Public ReadOnly Property [Namespace] As OpcNamespaceProperty value
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.
public int NamespaceIndex { get; }Public ReadOnly Property NamespaceIndex As IntegerProperty value
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.
public Uri NamespaceUri { get; }Public ReadOnly Property NamespaceUri As UriProperty value
The Uri to that the OpcName refers using the NamespaceIndex.
Null
Gets the default null name.
public static OpcName Null { get; }Public Shared ReadOnly Property Null As OpcNameProperty value
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.
public string Value { get; }Public ReadOnly Property Value As StringProperty value
The (unqualified) value of the name.
Methods
CompareTo
| Overload | Description |
|---|---|
| CompareTo( | Compares the current OpcName with the other. |
| CompareTo( | Compares the current OpcName with another OpcName. |
CompareTo(object)
Compares the current OpcName with the other.
public int CompareTo(object other)Public Function CompareTo(other As Object) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcName to compare with this OpcName. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).
Implements
CompareTo(OpcName)
Compares the current OpcName with another OpcName.
public int CompareTo(OpcName other)Public Function CompareTo(other As OpcName) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | OpcName | The OpcName to compare with this OpcName. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).
Implements
Equals
| Overload | Description |
|---|---|
| Equals( | Determines whether the specified other is equal to this OpcName. |
| Equals( | Determines whether the specified other is equal to this OpcName. |
Equals(object)
Determines whether the specified other is equal to this OpcName.
public override bool Equals(object other)Public Overrides Function Equals(other As Object) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcName to compare to the current OpcName. |
Returns
The value true if the specified OpcName is equal to the current OpcName; otherwise the value false.
Overrides
Equals(OpcName)
Determines whether the specified other is equal to this OpcName.
public bool Equals(OpcName other)Public Function Equals(other As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | OpcName | The OpcName to compare to the current OpcName. |
Returns
The value true if the specified OpcName is equal to the current OpcName; otherwise the value false.
Implements
GetHashCode
Retrieves a hash code for this OpcName.
public override int GetHashCode()Public Overrides Function GetHashCode() As IntegerReturns
An int that contains the hash code for the OpcName.
Overrides
IsNullOrEmpty
Indicates whether the specified OpcName is null or its Value is null or an empty string ("").
public static bool IsNullOrEmpty(OpcName name)Public Shared Function IsNullOrEmpty(name As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName to test. |
Returns
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
Converts a name string to a OpcName instance.
public static OpcName Parse(string value)Public Shared Function Parse(value As String) As OpcNameParameters
| Name | Type | Description |
|---|---|---|
value | String | A string that contains a name. |
Returns
An instance of the OpcName class.
Exceptions
| Exception | Condition |
|---|---|
| FormatException | The value is not a valid name. |
ToString
Returns a string representing the name.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string formatted with the Value and Namespace of the name.
Overrides
TryParse
Determines whether a string is a valid name.
public static bool TryParse(string value, out OpcName name)Public Shared Function TryParse(value As String, name As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
value | String | The string to validate. |
name | out OpcName | The OpcName version of the string. |
Returns
The value true, if value is a valid name; otherwise the value false.
Operators
Equality
Returns a value indicating whether two instance of OpcName are equal.
public static bool operator ==(OpcName left, OpcName right)Public Shared Operator =(left As OpcName, right As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcName | The first OpcName to compare. |
right | OpcName | The second OpcName to compare. |
Returns
The value true if left and right are equal; otherwise the value false.
Explicit
Converts a OpcName to an QualifiedName object.
[CLSCompliant(false)]
public static explicit operator QualifiedName(OpcName value)<CLSCompliant(False)>
Public Shared Narrowing Operator CType(value As OpcName) As QualifiedNameParameters
| Name | Type | Description |
|---|---|---|
value | OpcName | A OpcName that represents the qualified name. |
Returns
QualifiedName
An instance of the QualifiedName class initialized from the value.
GreaterThan
Determines whether the first specified OpcName object is greater than the second specified OpcName object.
public static bool operator >(OpcName left, OpcName right)Public Shared Operator >(left As OpcName, right As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcName | The first OpcName object. |
right | OpcName | The second OpcName object. |
Returns
The value true if left is greater than right; otherwise, false.
GreaterThanOrEqual
Determines whether the first specified OpcName object is greater than or equal to the second specified OpcName object.
public static bool operator >=(OpcName left, OpcName right)Public Shared Operator >=(left As OpcName, right As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcName | The first OpcName object. |
right | OpcName | The second OpcName object. |
Returns
The value true if left is greater than or equal to right; otherwise, false.
Implicit
| Overload | Description |
|---|---|
| implicit operator OpcName( | Converts a string to an OpcName object. |
| implicit operator OpcName( | Converts a QualifiedName to an OpcName object. |
implicit operator OpcName(string)
Converts a string to an OpcName object.
public static implicit operator OpcName(string value)Public Shared Widening Operator CType(value As String) As OpcNameParameters
| Name | Type | Description |
|---|---|---|
value | String | A string that represents the name. |
Returns
An instance of the OpcName class initialized from the value.
implicit operator OpcName(QualifiedName)
Converts a QualifiedName to an OpcName object.
[CLSCompliant(false)]
public static implicit operator OpcName(QualifiedName value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As QualifiedName) As OpcNameParameters
| Name | Type | Description |
|---|---|---|
value | QualifiedName | A QualifiedName that represents the name. |
Returns
An instance of the OpcName class initialized from the value.
Inequality
Returns a value indicating whether two instances of OpcName are not equal.
public static bool operator !=(OpcName left, OpcName right)Public Shared Operator <>(left As OpcName, right As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcName | The first OpcName to compare. |
right | OpcName | The second OpcName to compare. |
Returns
The value true if left and right are not equal; otherwise the value false.
LessThan
Determines whether the first specified OpcName object is less than the second specified OpcName object.
public static bool operator <(OpcName left, OpcName right)Public Shared Operator <(left As OpcName, right As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcName | The first OpcName object. |
right | OpcName | The second OpcName 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 OpcName object is less than or equal to the second OpcName object.
public static bool operator <=(OpcName left, OpcName right)Public Shared Operator <=(left As OpcName, right As OpcName) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcName | The first OpcName object. |
right | OpcName | The second OpcName 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 ( |

