Skip to content

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 ​

4 overloads

OverloadDescription
OpcNamePath(params string[])Initializes a new instance of the OpcNamePath class using the pathElements specified.
OpcNamePath(params OpcName[])Initializes a new instance of the OpcNamePath class using the pathElements specified.
OpcNamePath(IEnumerable<string>)Initializes a new instance of the OpcNamePath class using the pathElements specified.
OpcNamePath(IEnumerable<OpcName>)Initializes a new instance of the OpcNamePath class using the pathElements specified.

Exceptions (all overloads)

ExceptionCondition
ArgumentNullExceptionOne of the items in pathElements is a null reference (Nothing in Visual Basic).

OpcNamePath(params string[]) ​

Initializes a new instance of the OpcNamePath class using the pathElements specified.

csharp
public OpcNamePath(params string[] pathElements)
vbnet
Public Sub New(ParamArray pathElements As String())

Parameters

NameTypeDescription
pathElementsparams String[]The elements of the new OpcNamePath which are converted to OpcName instances used by the new instance.

Exceptions

ExceptionCondition
ArgumentExceptionOne of the items in pathElements is an empty string.

OpcNamePath(params OpcName[]) ​

Initializes a new instance of the OpcNamePath class using the pathElements specified.

csharp
public OpcNamePath(params OpcName[] pathElements)
vbnet
Public Sub New(ParamArray pathElements As OpcName())

Parameters

NameTypeDescription
pathElementsparams OpcName[]The elements of the new OpcNamePath.

OpcNamePath(IEnumerable<string>) ​

Initializes a new instance of the OpcNamePath class using the pathElements specified.

csharp
public OpcNamePath(IEnumerable<string> pathElements)
vbnet
Public Sub New(pathElements As IEnumerable(Of String))

Parameters

NameTypeDescription
pathElementsIEnumerable<String>The elements of the new OpcNamePath which are converted to OpcName instances used by the new instance.

Exceptions

ExceptionCondition
ArgumentExceptionOne of the items in pathElements is an empty string.

OpcNamePath(IEnumerable<OpcName>) ​

Initializes a new instance of the OpcNamePath class using the pathElements specified.

csharp
public OpcNamePath(IEnumerable<OpcName> pathElements)
vbnet
Public Sub New(pathElements As IEnumerable(Of OpcName))

Parameters

NameTypeDescription
pathElementsIEnumerable<OpcName>The elements of the new OpcNamePath.

Properties ​

Empty ​

static

Gets the default empty path.

csharp
public static OpcNamePath Empty { get; }
vbnet
Public Shared ReadOnly Property Empty As OpcNamePath

Property value

OpcNamePath

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.

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

Property value

Boolean

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.

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

Property value

Int32

The zero-based number of elements.

Methods ​

Combine ​

static

Combines the paths specified into one path there its sequence of elements is created from the consecutive elements of the paths passed.

csharp
public static OpcNamePath Combine(params OpcNamePath[] paths)
vbnet
Public Shared Function Combine(ParamArray paths As OpcNamePath()) As OpcNamePath

Parameters

NameTypeDescription
pathsparams OpcNamePath[]The array of OpcNamePath instances its elements have to be combined to a new OpcNamePath.

Returns

OpcNamePath

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

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

Remarks

In case there in paths is a null reference (Nothing in Visual Basic) it will be ignored.

CompareTo ​

2 overloads

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

CompareTo(object) ​

Compares the current OpcNamePath with the other.

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

Parameters

NameTypeDescription
otherObjectThe OpcNamePath to compare with this OpcNamePath.

Returns

Int32

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

Implements

CompareTo(object)

CompareTo(OpcNamePath) ​

Compares the current OpcNamePath with another OpcNamePath.

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

Parameters

NameTypeDescription
otherOpcNamePathThe OpcNamePath to compare with this OpcNamePath.

Returns

Int32

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

Implements

CompareTo(OpcNamePath)

Contains ​

Returns a value indicating whether a specified sub-path occurs within this OpcNamePath.

csharp
public bool Contains(OpcNamePath path)
vbnet
Public Function Contains(path As OpcNamePath) As Boolean

Parameters

NameTypeDescription
pathOpcNamePathThe OpcNamePath to seek.

Returns

Boolean

The value true if path is a sub-path of this OpcNamePath; otherwise the value false.

Exceptions

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

Equals ​

2 overloads

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

Equals(object) ​

override

Determines whether the specified other is equal to this OpcNamePath.

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

Parameters

NameTypeDescription
otherObjectThe OpcNamePath to compare to the current OpcNamePath.

Returns

Boolean

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

Overrides

Equals(object)

Equals(OpcNamePath) ​

Determines whether the specified other is equal to this OpcNamePath.

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

Parameters

NameTypeDescription
otherOpcNamePathThe OpcNamePath to compare to the current OpcNamePath.

Returns

Boolean

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

Implements

Equals(OpcNamePath)

GetEnumerator ​

since v2.19

Returns an enumerator that iterates through the path elements.

csharp
public IEnumerator<OpcName> GetEnumerator()
vbnet
Public Function GetEnumerator() As IEnumerator(Of OpcName)

Returns

IEnumerator<OpcName>

An enumerator that can be used to iterate through the path elements.

Implements

GetEnumerator()

GetHashCode ​

override

Retrieves a hash code for this OpcNamePath.

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

Returns

Int32

An int that contains the hash code for the OpcNamePath.

Overrides

GetHashCode()

Parse ​

static

Converts a path string to a OpcNamePath instance.

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

Parameters

NameTypeDescription
valueStringA string that contains a path.

Returns

OpcNamePath

An instance of the OpcNamePath class.

Exceptions

ExceptionCondition
FormatExceptionThe value is not a valid path.

ToArray ​

Copies the elements of the path to a new array of OpcName instances.

csharp
public OpcName[] ToArray()
vbnet
Public Function ToArray() As OpcName()

Returns

OpcName[]

An array of OpcName instances representing the elements of the path.

ToString ​

override

Returns a string representing the path.

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

Returns

String

A string formatted with the elements of the path.

Overrides

ToString()

TryParse ​

static

Determines whether a string is a valid path.

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

Parameters

NameTypeDescription
valueStringThe string to validate.
pathout OpcNamePathThe OpcNamePath version of the string.

Returns

Boolean

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

Operators ​

Equality ​

static

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

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

Parameters

NameTypeDescription
leftOpcNamePathThe first OpcNamePath to compare.
rightOpcNamePathThe second OpcNamePath to compare.

Returns

Boolean

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

GreaterThan ​

static

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

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

Parameters

NameTypeDescription
leftOpcNamePathThe first OpcNamePath object.
rightOpcNamePathThe second OpcNamePath object.

Returns

Boolean

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

GreaterThanOrEqual ​

static

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

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

Parameters

NameTypeDescription
leftOpcNamePathThe first OpcNamePath object.
rightOpcNamePathThe second OpcNamePath object.

Returns

Boolean

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

Implicit ​

static · 2 overloads

OverloadDescription
implicit operator OpcNamePath(string)staticConverts a string to an OpcNamePath object.
implicit operator OpcNamePath(OpcName)staticCreates a new instance of the OpcNamePath from the value specified.

implicit operator OpcNamePath(string) ​

static

Converts a string to an OpcNamePath object.

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

Parameters

NameTypeDescription
valueStringA string that represents the name path.

Returns

OpcNamePath

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) ​

static

Creates a new instance of the OpcNamePath from the value specified.

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

Parameters

NameTypeDescription
valueOpcNameThe OpcName representing the only element in the path.

Returns

OpcNamePath

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 ​

static

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

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

Parameters

NameTypeDescription
leftOpcNamePathThe first OpcNamePath to compare.
rightOpcNamePathThe second OpcNamePath 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 OpcNamePath object is less than the second specified OpcNamePath object.

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

Parameters

NameTypeDescription
leftOpcNamePathThe first OpcNamePath object.
rightOpcNamePathThe second OpcNamePath 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 OpcNamePath object is less than or equal to the second OpcNamePath object.

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

Parameters

NameTypeDescription
leftOpcNamePathThe first OpcNamePath object.
rightOpcNamePathThe second OpcNamePath 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).

Indexers ​

Item ​

Gets the OpcName at the specified index.

csharp
public OpcName this[int index] { get; }
vbnet
Public ReadOnly Default Property this[](index As Integer) As OpcName

Parameters

NameTypeDescription
indexInt32The zero-based index of the element to get.

Property value

OpcName

The OpcName at the specified index.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe index is not valid index in the OpcNamePath.