Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcRelativePath type exposes the following members.
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
One of the items in pathElements
does not indicate a name (see IsNull).
The pathElements
or one of its items is a null reference (Nothing in Visual Basic).
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
The pathElements
or one of its items is a null reference (Nothing in Visual Basic).
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
One of the items in pathElements
is equals to Empty.
The pathElements
or one of its items is a null reference (Nothing in Visual Basic).
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
One of the items in pathElements
does not indicate a name (see IsNull).
The pathElements
or one of its items is a null reference (Nothing in Visual Basic).
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
The pathElements
or one of its items is a null reference (Nothing in Visual Basic).
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
One of the items in pathElements
is equals to Empty.
The pathElements
or one of its items is a null reference (Nothing in Visual Basic).
Gets the OpcRelativePathElement at the specified index.
C#
public OpcRelativePathElement this[int index] { get; }
Property Value
The OpcRelativePathElement at the specified index.
Exceptions
The index
is not a valid index in the OpcRelativePath.
Gets the total number of elements in the OpcRelativePath.
C#
public int Length { get; }
Property Value
The total number of elements in the OpcRelativePath; zero if there are no elements in the path.
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
The combined paths
.
Exceptions
The paths
or one of its items is a null reference (Nothing in Visual Basic).
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.
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
An instance of the OpcRelativePath class.
Exceptions
The value
is an empty string.
The value
is a null reference (Nothing in Visual Basic).
The value
is not a valid path.
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
An instance of the OpcRelativePath class.
Exceptions
The value
is an empty string.
The value
is a null reference (Nothing in Visual Basic).
The value
is not a valid path.
Returns a string representing the relative path.
C#
public override string ToString()
Returns
A string formatted using the elements of the current OpcRelativePath.
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
A string formatted using the elements of the current OpcRelativePath.
Exceptions
The context
is a null reference (Nothing in Visual Basic).
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
The value true, if value
is a valid path; otherwise the value false.
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
The value true, if value
is a valid path; otherwise the value false.