# IOpcReadOnlyNodeDataStore Members

> Reference: Defines read-only mechanisms to retrieve node related data using OPC UA defined techniques to store and locate information using different OpcAttribute's and OpcName's.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcReadOnlyNodeDataStore</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Inherits members from [IOpcNamespaceResolver](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnamespaceresolver/members).

## Methods

### Get

<span class="api-meta">6 overloads</span>

| Overload | Description |
|---|---|
| [Get&lt;T&gt;(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-system-string) | Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcname) | Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcAttribute, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcattribute-system-string) | Retrieves the value of the `attribute` of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcAttribute, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcattribute-opc-uafx-opcname) | Retrieves the value of the `attribute` of the element browsable through the `name` specified. |
| [Get&lt;T&gt;(OpcAttribute, params OpcName\[\])](#get-t1-opc-uafx-opcattribute-opc-uafx-opcname-array) | Retrieves the value of the `attribute` of the element browsable through the `pathElements` specified. |
| [Get&lt;T&gt;(OpcAttribute, OpcNamePath)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcreadonlynodedatastore/members#get-t1-opc-uafx-opcattribute-opc-uafx-opcnamepath) | Retrieves the value of the `attribute` of the element browsable through the `path` specified. |

#### Get&lt;T&gt;(string)

Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified.

<div class="api-signature" data-lang="csharp">

```csharp
T Get<T>(string name = "")
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function [Get](Of T)(name As String = "") As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of the value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) formatted [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) to use to browse to the element from that the requested [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute is to be retrieved. Optional, default `""`. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

#### Get&lt;T&gt;(OpcName)

Retrieves the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute of the element browsable through the `name` specified.

<div class="api-signature" data-lang="csharp">

```csharp
T Get<T>(OpcName name)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function [Get](Of T)(name As OpcName) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) to use to browse to the element from that the requested [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

#### Get&lt;T&gt;(OpcAttribute, string)

Retrieves the value of the `attribute` of the element browsable through the `name` specified.

<div class="api-signature" data-lang="csharp">

```csharp
T Get<T>(OpcAttribute attribute, string name = "")
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function [Get](Of T)(attribute As OpcAttribute, name As String = "") As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `name`. |
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) formatted [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) to use to browse to the element from that the requested `attribute` value is to be retrieved. Optional, default `""`. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

#### Get&lt;T&gt;(OpcAttribute, OpcName)

Retrieves the value of the `attribute` of the element browsable through the `name` specified.

<div class="api-signature" data-lang="csharp">

```csharp
T Get<T>(OpcAttribute attribute, OpcName name)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function [Get](Of T)(attribute As OpcAttribute, name As OpcName) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `name`. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) to use to browse to the element from that the requested `attribute` value is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

#### Get&lt;T&gt;(OpcAttribute, params OpcName\[\])

Retrieves the value of the `attribute` of the element browsable through the `pathElements` specified.

<div class="api-signature" data-lang="csharp">

```csharp
T Get<T>(OpcAttribute attribute, params OpcName[] pathElements)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function [Get](Of T)(
    attribute As OpcAttribute,
    ParamArray pathElements As OpcName()) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `pathElements`. |
| `pathElements` | params [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/)[] | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/)'s to use to browse to the element from that the requested `attribute` value is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | One of the items in `pathElements` is a null reference (Nothing in Visual Basic). |

#### Get&lt;T&gt;(OpcAttribute, OpcNamePath)

Retrieves the value of the `attribute` of the element browsable through the `path` specified.

<div class="api-signature" data-lang="csharp">

```csharp
T Get<T>(OpcAttribute attribute, OpcNamePath path)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function [Get](Of T)(attribute As OpcAttribute, path As OpcNamePath) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to query. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration identifying the attribute value to query from the element specified by the `path`. |
| `path` | [OpcNamePath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamepath/) | The sequence [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) instances to use to browse to the element from that the requested `attribute` value is to be retrieved. |

**Returns**

T

The `T` of the attribute of the element requested or the default value if the attribute value is not of the type specified by `T`.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `path` is a null reference (Nothing in Visual Basic). |

### ToArray

<span class="api-meta">since v2.54</span>

Copies the elements of this data store to a new array.

<div class="api-signature" data-lang="csharp">

```csharp
object[] ToArray()
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Function ToArray() As Object()
```

</div>

**Returns**

[Object](https://learn.microsoft.com/dotnet/api/system.object)[]

An [object](https://learn.microsoft.com/dotnet/api/system.object) array containing copies of the elements of this data store.
