Reference
OpcNamePath Members
Defines a sequence of OpcName objects which can be used to browse through nodes using their Name values as the selection criteria to query node by node using the elements of the path.
Reference
OpcNamePath Members
- Type
- OpcNamePath
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Constructors
OpcNamePath
| Overload | Description |
|---|---|
| OpcNamePath( | Initializes a new instance of the OpcNamePath class using the pathElements specified. |
| OpcNamePath( | Initializes a new instance of the OpcNamePath class using the pathElements specified. |
| OpcNamePath( | Initializes a new instance of the OpcNamePath class using the pathElements specified. |
| OpcNamePath( | Initializes a new instance of the OpcNamePath class using the pathElements specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | One of the items in pathElements is a null reference ( |
OpcNamePath(params string[])
Initializes a new instance of the OpcNamePath class using the pathElements specified.
public OpcNamePath(params string[] pathElements)Public Sub New(ParamArray pathElements As String())Parameters
| Name | Type | Description |
|---|---|---|
pathElements | params String[] | The elements of the new OpcNamePath which are converted to OpcName instances used by the new instance. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | One of the items in pathElements is an empty string. |
OpcNamePath(params OpcName[])
Initializes a new instance of the OpcNamePath class using the pathElements specified.
public OpcNamePath(params OpcName[] pathElements)Public Sub New(ParamArray pathElements As OpcName())Parameters
| Name | Type | Description |
|---|---|---|
pathElements | params OpcName[] | The elements of the new OpcNamePath. |
OpcNamePath(IEnumerable<string>)
Initializes a new instance of the OpcNamePath class using the pathElements specified.
public OpcNamePath(IEnumerable<string> pathElements)Public Sub New(pathElements As IEnumerable(Of String))Parameters
| Name | Type | Description |
|---|---|---|
pathElements | IEnumerable<String> | The elements of the new OpcNamePath which are converted to OpcName instances used by the new instance. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | One of the items in pathElements is an empty string. |
OpcNamePath(IEnumerable<OpcName>)
Initializes a new instance of the OpcNamePath class using the pathElements specified.
public OpcNamePath(IEnumerable<OpcName> pathElements)Public Sub New(pathElements As IEnumerable(Of OpcName))Parameters
| Name | Type | Description |
|---|---|---|
pathElements | IEnumerable<OpcName> | The elements of the new OpcNamePath. |
Properties
Empty
Gets the default empty path.
public static OpcNamePath Empty { get; }Public Shared ReadOnly Property Empty As OpcNamePathProperty value
An instance of the OpcNamePath which can be used for general purpose in cases there an empty path is enough.
IsEmpty
Gets a value indicating whether the path is empty.
public bool IsEmpty { get; }Public ReadOnly Property IsEmpty As BooleanProperty value
The value true if there exist no element in the path; otherwise the value false.
Length
Gets the number of elements contained in the OpcNamePath.
public int Length { get; }Public ReadOnly Property Length As IntegerProperty value
The zero-based number of elements.
Methods
Combine
Combines the paths specified into one path there its sequence of elements is created from the consecutive elements of the paths passed.
public static OpcNamePath Combine(params OpcNamePath[] paths)Public Shared Function Combine(ParamArray paths As OpcNamePath()) As OpcNamePathParameters
| Name | Type | Description |
|---|---|---|
paths | params OpcNamePath[] | The array of OpcNamePath instances its elements have to be combined to a new OpcNamePath. |
Returns
A new instance of the OpcNamePath class with the elements of the first path followed by the elements of the second path and so on for all other paths specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The paths is a null reference ( |
Remarks
In case there in paths is a null reference (Nothing in Visual Basic) it will be ignored.
CompareTo
| Overload | Description |
|---|---|
| CompareTo( | Compares the current OpcNamePath with the other. |
| CompareTo( | Compares the current OpcNamePath with another OpcNamePath. |
CompareTo(object)
Compares the current OpcNamePath with the other.
public int CompareTo(object other)Public Function CompareTo(other As Object) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcNamePath to compare with this OpcNamePath. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).
Implements
CompareTo(OpcNamePath)
Compares the current OpcNamePath with another OpcNamePath.
public int CompareTo(OpcNamePath other)Public Function CompareTo(other As OpcNamePath) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | OpcNamePath | The OpcNamePath to compare with this OpcNamePath. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).
Implements
Contains
Returns a value indicating whether a specified sub-path occurs within this OpcNamePath.
public bool Contains(OpcNamePath path)Public Function Contains(path As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
path | OpcNamePath | The OpcNamePath to seek. |
Returns
The value true if path is a sub-path of this OpcNamePath; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The path is a null reference ( |
Equals
| Overload | Description |
|---|---|
| Equals( | Determines whether the specified other is equal to this OpcNamePath. |
| Equals( | Determines whether the specified other is equal to this OpcNamePath. |
Equals(object)
Determines whether the specified other is equal to this OpcNamePath.
public override bool Equals(object other)Public Overrides Function Equals(other As Object) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcNamePath to compare to the current OpcNamePath. |
Returns
The value true if the specified OpcNamePath is equal to the current OpcNamePath; otherwise the value false.
Overrides
Equals(OpcNamePath)
Determines whether the specified other is equal to this OpcNamePath.
public bool Equals(OpcNamePath other)Public Function Equals(other As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | OpcNamePath | The OpcNamePath to compare to the current OpcNamePath. |
Returns
The value true if the specified OpcNamePath is equal to the current OpcNamePath; otherwise the value false.
Implements
GetEnumerator
Returns an enumerator that iterates through the path elements.
public IEnumerator<OpcName> GetEnumerator()Public Function GetEnumerator() As IEnumerator(Of OpcName)Returns
An enumerator that can be used to iterate through the path elements.
Implements
GetHashCode
Retrieves a hash code for this OpcNamePath.
public override int GetHashCode()Public Overrides Function GetHashCode() As IntegerReturns
An int that contains the hash code for the OpcNamePath.
Overrides
Parse
Converts a path string to a OpcNamePath instance.
public static OpcNamePath Parse(string value)Public Shared Function Parse(value As String) As OpcNamePathParameters
| Name | Type | Description |
|---|---|---|
value | String | A string that contains a path. |
Returns
An instance of the OpcNamePath class.
Exceptions
| Exception | Condition |
|---|---|
| FormatException | The value is not a valid path. |
ToArray
Copies the elements of the path to a new array of OpcName instances.
public OpcName[] ToArray()Public Function ToArray() As OpcName()Returns
OpcName[]
An array of OpcName instances representing the elements of the path.
ToString
Returns a string representing the path.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string formatted with the elements of the path.
Overrides
TryParse
Determines whether a string is a valid path.
public static bool TryParse(string value, out OpcNamePath path)Public Shared Function TryParse(value As String, path As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
value | String | The string to validate. |
path | out OpcNamePath | The OpcNamePath version of the string. |
Returns
The value true, if value is a valid path; otherwise the value false.
Operators
Equality
Returns a value indicating whether two instance of OpcNamePath are equal.
public static bool operator ==(OpcNamePath left, OpcNamePath right)Public Shared Operator =(left As OpcNamePath, right As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcNamePath | The first OpcNamePath to compare. |
right | OpcNamePath | The second OpcNamePath to compare. |
Returns
The value true if left and right are equal; otherwise the value false.
GreaterThan
Determines whether the first specified OpcNamePath object is greater than the second specified OpcNamePath object.
public static bool operator >(OpcNamePath left, OpcNamePath right)Public Shared Operator >(left As OpcNamePath, right As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcNamePath | The first OpcNamePath object. |
right | OpcNamePath | The second OpcNamePath object. |
Returns
The value true if left is greater than right; otherwise, false.
GreaterThanOrEqual
Determines whether the first specified OpcNamePath object is greater than or equal to the second specified OpcNamePath object.
public static bool operator >=(OpcNamePath left, OpcNamePath right)Public Shared Operator >=(left As OpcNamePath, right As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcNamePath | The first OpcNamePath object. |
right | OpcNamePath | The second OpcNamePath object. |
Returns
The value true if left is greater than or equal to right; otherwise, false.
Implicit
| Overload | Description |
|---|---|
| implicit operator OpcNamePath( | Converts a string to an OpcNamePath object. |
| implicit operator OpcNamePath( | Creates a new instance of the OpcNamePath from the value specified. |
implicit operator OpcNamePath(string)
Converts a string to an OpcNamePath object.
public static implicit operator OpcNamePath(string value)Public Shared Widening Operator CType(value As String) As OpcNamePathParameters
| Name | Type | Description |
|---|---|---|
value | String | A string that represents the name path. |
Returns
An instance of the OpcNamePath class initialized from the value or a null reference (Nothing in Visual Basic) if value is a null reference (Nothing in Visual Basic).
implicit operator OpcNamePath(OpcName)
Creates a new instance of the OpcNamePath from the value specified.
public static implicit operator OpcNamePath(OpcName value)Public Shared Widening Operator CType(value As OpcName) As OpcNamePathParameters
| Name | Type | Description |
|---|---|---|
value | OpcName | The OpcName representing the only element in the path. |
Returns
An instance of the OpcNamePath class initialized with the value specified or a null reference (Nothing in Visual Basci) if value is a null reference (Nothing in Visual Basic).
Inequality
Returns a value indicating whether two instances of OpcNamePath are not equal.
public static bool operator !=(OpcNamePath left, OpcNamePath right)Public Shared Operator <>(left As OpcNamePath, right As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcNamePath | The first OpcNamePath to compare. |
right | OpcNamePath | The second OpcNamePath to compare. |
Returns
The value true if left and right are not equal; otherwise the value false.
LessThan
Determines whether the first specified OpcNamePath object is less than the second specified OpcNamePath object.
public static bool operator <(OpcNamePath left, OpcNamePath right)Public Shared Operator <(left As OpcNamePath, right As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcNamePath | The first OpcNamePath object. |
right | OpcNamePath | The second OpcNamePath 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 OpcNamePath object is less than or equal to the second OpcNamePath object.
public static bool operator <=(OpcNamePath left, OpcNamePath right)Public Shared Operator <=(left As OpcNamePath, right As OpcNamePath) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcNamePath | The first OpcNamePath object. |
right | OpcNamePath | The second OpcNamePath 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 ( |
Indexers
Item
Gets the OpcName at the specified index.
public OpcName this[int index] { get; }Public ReadOnly Default Property this[](index As Integer) As OpcNameParameters
| Name | Type | Description |
|---|---|---|
index | Int32 | The zero-based index of the element to get. |
Property value
The OpcName at the specified index.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The index is not valid index in the OpcNamePath. |

