Skip to content

Reference

OpcRelativePath Members

Defines a sequence of references and browse names to follow.

Reference

OpcRelativePath Members ​

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

Constructors ​

OpcRelativePath ​

6 overloads

OverloadDescription
OpcRelativePath(IEnumerable<string>)Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.
OpcRelativePath(params string[])Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.
OpcRelativePath(IEnumerable<OpcName>)Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.
OpcRelativePath(params OpcName[])Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.
OpcRelativePath(IEnumerable<OpcRelativePathElement>)Initializes a new instance of the OpcRelativePath class with the pathElements specified.
OpcRelativePath(params OpcRelativePathElement[])Initializes a new instance of the OpcRelativePath class with the pathElements specified.

Exceptions (all overloads)

ExceptionCondition
ArgumentNullExceptionThe pathElements or one of its items is a null reference (Nothing in Visual Basic).

OpcRelativePath(IEnumerable<string>) ​

Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.

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

Parameters

NameTypeDescription
pathElementsIEnumerable<String>A sequence of string objects representing the value of the BrowseName attribute of the hierarchical nodes their path is to be expressed by the new OpcRelativePath.

Exceptions

ExceptionCondition
ArgumentExceptionOne of the items in pathElements is equals to Empty.

OpcRelativePath(params string[]) ​

Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.

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

Parameters

NameTypeDescription
pathElementsparams String[]An array of string objects representing the value of the BrowseName attribute of the hierarchical nodes their path is to be expressed by the new OpcRelativePath.

Exceptions

ExceptionCondition
ArgumentExceptionOne of the items in pathElements is equals to Empty.

OpcRelativePath(IEnumerable<OpcName>) ​

Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.

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

Parameters

NameTypeDescription
pathElementsIEnumerable<OpcName>A sequence of OpcName objects representing the value of the BrowseName attribute of the hierarchical nodes their path is to be expressed by the new OpcRelativePath.

Exceptions

ExceptionCondition
ArgumentExceptionOne of the items in pathElements does not indicate a name (see IsNull).

OpcRelativePath(params OpcName[]) ​

Initializes a new instance of the OpcRelativePath class with the pathElements specified to define a path following hierarchical references using the pathElements as the browse names of the nodes their path is to be expressed.

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

Parameters

NameTypeDescription
pathElementsparams OpcName[]An array of OpcName objects representing the value of the BrowseName attribute of the hierarchical nodes their path is to be expressed by the new OpcRelativePath.

Exceptions

ExceptionCondition
ArgumentExceptionOne of the items in pathElements does not indicate a name (see IsNull).

OpcRelativePath(IEnumerable<OpcRelativePathElement>) ​

Initializes a new instance of the OpcRelativePath class with the pathElements specified.

csharp
public OpcRelativePath(IEnumerable<OpcRelativePathElement> pathElements)
vbnet
Public Sub New(pathElements As IEnumerable(Of OpcRelativePathElement))

Parameters

NameTypeDescription
pathElementsIEnumerable<OpcRelativePathElement>A sequence of OpcRelativePathElement objects representing the BrowseName and reference of the nodes their path is to be expressed by the new OpcRelativePath.

OpcRelativePath(params OpcRelativePathElement[]) ​

Initializes a new instance of the OpcRelativePath class with the pathElements specified.

csharp
public OpcRelativePath(params OpcRelativePathElement[] pathElements)
vbnet
Public Sub New(ParamArray pathElements As OpcRelativePathElement())

Parameters

NameTypeDescription
pathElementsparams OpcRelativePathElement[]An array of OpcRelativePathElement objects representing the BrowseName and reference of the nodes their path is to be expressed by the new OpcRelativePath.

Properties ​

Length ​

Gets the total number of elements in the OpcRelativePath.

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

Property value

Int32

The total number of elements in the OpcRelativePath; zero if there are no elements in the path.

Methods ​

Combine ​

static

Combines the paths into a single OpcRelativePath.

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

Parameters

NameTypeDescription
pathsparams OpcRelativePath[]An array of parts of the path to construct.

Returns

OpcRelativePath

The combined paths.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe paths or one of its items is a null reference (Nothing in Visual Basic).

GetEnumerator ​

since v2.18

Returns an enumerator that iterates through the path.

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

Returns

IEnumerator<OpcRelativePathElement>

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

Implements

GetEnumerator()

Parse ​

static · 2 overloads

OverloadDescription
Parse(string)staticConverts a path string to a OpcRelativePath instance.
Parse(OpcContext, string)static · since v2.18Converts a path string to a OpcRelativePath instance using a specific OpcContext.

Exceptions (all overloads)

ExceptionCondition
ArgumentExceptionThe value is an empty string.
ArgumentNullExceptionThe value is a null reference (Nothing in Visual Basic).
FormatExceptionThe value is not a valid path.

Parse(string) ​

static

Converts a path string to a OpcRelativePath instance.

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

Parameters

NameTypeDescription
valueStringA string that contains a path.

Returns

OpcRelativePath

An instance of the OpcRelativePath class.

Parse(OpcContext, string) ​

static · since v2.18

Converts a path string to a OpcRelativePath instance using a specific OpcContext.

csharp
public static OpcRelativePath Parse(OpcContext context, string value)
vbnet
Public Shared Function Parse(
    context As OpcContext,
    value As String) As OpcRelativePath

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to parse the reference types used in the value.
valueStringA string that contains a path.

Returns

OpcRelativePath

An instance of the OpcRelativePath class.

ToString ​

2 overloads

OverloadDescription
ToString()overrideReturns a string representing the relative path.
ToString(OpcContext)since v2.18Returns a string representing the relative path using the context specified.

ToString() ​

override

Returns a string representing the relative path.

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

Returns

String

A string formatted using the elements of the current OpcRelativePath.

Overrides

ToString()

ToString(OpcContext) ​

since v2.18

Returns a string representing the relative path using the context specified.

csharp
public string ToString(OpcContext context)
vbnet
Public Function ToString(context As OpcContext) As String

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to resolve the names of reference types used among the elements in the path.

Returns

String

A string formatted using the elements of the current OpcRelativePath.

Exceptions

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

TryParse ​

static · 2 overloads · since v2.18

OverloadDescription
TryParse(string, out OpcRelativePath)static · since v2.18Determines whether a string is a valid path.
TryParse(OpcContext, string, out OpcRelativePath)static · since v2.18Determines whether a string is a valid path using a specific OpcContext.

TryParse(string, out OpcRelativePath) ​

static · since v2.18

Determines whether a string is a valid path.

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

Parameters

NameTypeDescription
valueStringThe string to validate.
pathout OpcRelativePathThe OpcRelativePath version of the string.

Returns

Boolean

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

TryParse(OpcContext, string, out OpcRelativePath) ​

static · since v2.18

Determines whether a string is a valid path using a specific OpcContext.

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

Parameters

NameTypeDescription
contextOpcContextThe OpcContext to use to parse the reference types used in the value.
valueStringThe string to validate.
pathout OpcRelativePathThe OpcRelativePath version of the string.

Returns

Boolean

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

Indexers ​

Item ​

Gets the OpcRelativePathElement at the specified index.

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

Parameters

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

Property value

OpcRelativePathElement

The OpcRelativePathElement at the specified index.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe index is not a valid index in the OpcRelativePath.