Skip to content

Reference

OpcReadOnlyNodeCollection Members

Provides a read-only collection of IOpcNode instances accessible by their Id or just using an index.

Reference

OpcReadOnlyNodeCollection Members ​

Type
OpcReadOnlyNodeCollection
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Properties ​

Count ​

Gets the number of nodes contained in the OpcReadOnlyNodeCollection instance.

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

Property value

Int32

The number of nodes contained in the OpcReadOnlyNodeCollection instance.

Implements

Count, Count

Empty ​

static

Gets an empty instance used in cases there the concrete collection does not yet exists.

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

Property value

OpcReadOnlyNodeCollection

An instance of the OpcReadOnlyNodeCollection which can be used for general purpose in cases there an empty collection is required.

Items ​

protected

Gets the IList<T> that the OpcReadOnlyNodeCollection wraps.

csharp
protected IList<IOpcNode> Items { get; }
vbnet
Protected ReadOnly Property Items As IList(Of IOpcNode)

Property value

IList<IOpcNode>

The IList<T> that the OpcReadOnlyNodeCollection wraps.

Methods ​

Contains ​

2 overloads

OverloadDescription
Contains(IOpcNode)Determines whether a node is in the OpcReadOnlyNodeCollection.
Contains(OpcNodeId)Determines whether a node with the id specified is in the OpcReadOnlyNodeCollection.

Contains(IOpcNode) ​

Determines whether a node is in the OpcReadOnlyNodeCollection.

csharp
public bool Contains(IOpcNode value)
vbnet
Public Function Contains(value As IOpcNode) As Boolean

Parameters

NameTypeDescription
valueIOpcNodeThe object to locate in the OpcReadOnlyNodeCollection.

Returns

Boolean

The value true if value is found in the OpcReadOnlyNodeCollection; otherwise, the value false.

Exceptions

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

Implements

Contains(IOpcNode)

Contains(OpcNodeId) ​

Determines whether a node with the id specified is in the OpcReadOnlyNodeCollection.

csharp
public bool Contains(OpcNodeId id)
vbnet
Public Function Contains(id As OpcNodeId) As Boolean

Parameters

NameTypeDescription
idOpcNodeIdThe OpcNodeId to use to look up a existing node.

Returns

Boolean

The value true if a node exists in the OpcReadOnlyNodeCollection with the id; otherwise, the value false.

Exceptions

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

CopyTo ​

Copies the entire OpcReadOnlyNodeCollection to a compatible one-dimensional Array, starting at the specified index of the target array.

csharp
public void CopyTo(IOpcNode[] array, int index)
vbnet
Public Sub CopyTo(array As IOpcNode(), index As Integer)

Parameters

NameTypeDescription
arrayIOpcNode[]The one-dimensional Array that is the destination of the elements copied from OpcReadOnlyNodeCollection. The Array must have zero-based indexing.
indexInt32The zero-based index in array at which copying begins.

Exceptions

ExceptionCondition
ArgumentExceptionThe number of elements in the source OpcReadOnlyNodeCollection is greater than the available space from index to the end of the destination array.
ArgumentNullExceptionThe array is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeExceptionThe index is less than zero.

Implements

CopyTo(IOpcNode[], int)

GetEnumerator ​

Returns an enumerator that iterates through the OpcReadOnlyNodeCollection.

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

Returns

IEnumerator<IOpcNode>

An IEnumerator<T> for the OpcReadOnlyNodeCollection.

Implements

GetEnumerator()

IndexOf ​

Searches for the specified object and returns the zero-based index of the first occurrence within the entire OpcReadOnlyNodeCollection.

csharp
public int IndexOf(IOpcNode value)
vbnet
Public Function IndexOf(value As IOpcNode) As Integer

Parameters

NameTypeDescription
valueIOpcNodeThe node to locate in the OpcReadOnlyNodeCollection.

Returns

Int32

The zero-based index of the first occurrence of item within the entire value, if found; otherwise the value -1.

Exceptions

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

Implements

IndexOf(IOpcNode)

TryGet ​

since v2.15

Tries to determine the item associated with the specified id.

csharp
public bool TryGet(OpcNodeId id, out IOpcNode node)
vbnet
Public Function TryGet(id As OpcNodeId, node As IOpcNode) As Boolean

Parameters

NameTypeDescription
idOpcNodeIdThe OpcNodeId whose IOpcNode item to get.
nodeout IOpcNodeWhen this method returns, the IOpcNode associated with the specified id, if the id is found; otherwise, a null reference (Nothing in Visual Basic).

Returns

Boolean

Exceptions

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

Indexers ​

Item ​

2 overloads

OverloadDescription
this[int]Gets the node at the specified index.
this[OpcNodeId]Gets the node at the specified index.

this[int] ​

Gets the node at the specified index.

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

Parameters

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

Property value

IOpcNode

The node at the specified index.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe index is not valid index in the OpcReadOnlyNodeCollection.

this[OpcNodeId] ​

Gets the node at the specified index.

csharp
public IOpcNode this[OpcNodeId id] { get; }
vbnet
Public ReadOnly Default Property this[](id As OpcNodeId) As IOpcNode

Parameters

NameTypeDescription
idOpcNodeIdThe OpcNodeId of the node to get.

Property value

IOpcNode

The node with the specified id.

Exceptions

ExceptionCondition
KeyNotFoundExceptionThe id does not refer to a node with such an Id.