OpcRelativePath Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcRelativePath type exposes the following members.

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.

C#

public OpcRelativePath(IEnumerable<OpcName> pathElements)


Parameters

pathElements IEnumerable<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

ArgumentException

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

ArgumentNullException

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

OpcRelativePath(IEnumerable<OpcRelativePathElement>)

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

C#

public OpcRelativePath(IEnumerable<OpcRelativePathElement> pathElements)


Parameters

pathElements IEnumerable<OpcRelativePathElement>

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


Exceptions

ArgumentNullException

The 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.

C#

public OpcRelativePath(IEnumerable<string> pathElements)


Parameters

pathElements IEnumerable<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

ArgumentException

One of the items in pathElements is equals to Empty.

ArgumentNullException

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

OpcRelativePath(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.

C#

public OpcRelativePath(params OpcName[] pathElements)


Parameters

pathElements 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

ArgumentException

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

ArgumentNullException

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

OpcRelativePath(OpcRelativePathElement[])

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

C#

public OpcRelativePath(params OpcRelativePathElement[] pathElements)


Parameters

pathElements OpcRelativePathElement[]

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


Exceptions

ArgumentNullException

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

OpcRelativePath(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.

C#

public OpcRelativePath(params string[] pathElements)


Parameters

pathElements 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

ArgumentException

One of the items in pathElements is equals to Empty.

ArgumentNullException

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

Item[Int32]

Gets the OpcRelativePathElement at the specified index.

C#

public OpcRelativePathElement this[int index] { get; }


Property Value

OpcRelativePathElement

The OpcRelativePathElement at the specified index.



Exceptions

ArgumentOutOfRangeException

The index is not a valid index in the OpcRelativePath.

Length

Gets the total number of elements in the OpcRelativePath.

C#

public int Length { get; }


Property Value

Int32

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

Combine(OpcRelativePath[])

Combines the paths into a single OpcRelativePath.

C#

public static OpcRelativePath Combine(params OpcRelativePath[] paths)


Parameters

paths OpcRelativePath[]

An array of parts of the path to construct.


Returns

OpcRelativePath

The combined paths.



Exceptions

ArgumentNullException

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

GetEnumerator()

Returns an enumerator that iterates through the path.

C#

public IEnumerator<OpcRelativePathElement> GetEnumerator()


Returns

IEnumerator<OpcRelativePathElement>

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

Parse(OpcContext, String)

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

C#

public static OpcRelativePath Parse(OpcContext context, string value)


Parameters

context OpcContext

The OpcContext to use to parse the reference types used in the value.

value String

A string that contains a path.


Returns

OpcRelativePath

An instance of the OpcRelativePath class.



Exceptions

ArgumentException

The value is an empty string.

ArgumentNullException

The value is a null reference (Nothing in Visual Basic).

FormatException

The value is not a valid path.

Parse(String)

Converts a path string to a OpcRelativePath instance.

C#

public static OpcRelativePath Parse(string value)


Parameters

value String

A string that contains a path.


Returns

OpcRelativePath

An instance of the OpcRelativePath class.



Exceptions

ArgumentException

The value is an empty string.

ArgumentNullException

The value is a null reference (Nothing in Visual Basic).

FormatException

The value is not a valid path.

ToString()

Returns a string representing the relative path.

C#

public override string ToString()


Returns

String

A string formatted using the elements of the current OpcRelativePath.

ToString(OpcContext)

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

C#

public string ToString(OpcContext context)


Parameters

context OpcContext

The 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

ArgumentNullException

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

TryParse(OpcContext, String, out OpcRelativePath)

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

C#

public static bool TryParse(OpcContext context, string value, out OpcRelativePath path)


Parameters

context OpcContext

The OpcContext to use to parse the reference types used in the value.

value String

The string to validate.

path OpcRelativePath

The OpcRelativePath version of the string.


Returns

Boolean

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

TryParse(String, out OpcRelativePath)

Determines whether a string is a valid path.

C#

public static bool TryParse(string value, out OpcRelativePath path)


Parameters

value String

The string to validate.

path OpcRelativePath

The OpcRelativePath version of the string.


Returns

Boolean

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