# OpcNodeHistorian Members

> Reference: Provides and maintains the history of the values of an OpcVariableNode in memory.

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

## Constructors

### OpcNodeHistorian

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

| Overload | Description |
|---|---|
| [OpcNodeHistorian(OpcNodeManager, OpcVariableNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#opcnodehistorian-opc-uafx-server-opcnodemanager-opc-uafx-opcvariablenode) | Initializes a new instance of the [OpcNodeHistorian](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/) class using the `owner` and `node` specified. |
| [OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#opcnodehistorian-opc-uafx-server-opcnodemanager-opc-uafx-opcvariablenode-system-int32) | Initializes a new instance of the [OpcNodeHistorian](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/) class using the `owner`, `node` and `capacity` specified. |
| [OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int, int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#opcnodehistorian-opc-uafx-server-opcnodemanager-opc-uafx-opcvariablenode-system-int32-system-int32) | Initializes a new instance of the [OpcNodeHistorian](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/) class using the `owner`, `node`, `capacity` and `modifiedCapacity` specified. |

**Exceptions (all overloads)**

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

#### OpcNodeHistorian(OpcNodeManager, OpcVariableNode)

Initializes a new instance of the [OpcNodeHistorian](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/) class using the `owner` and `node` specified. The number of values kept in [History](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#history) and [ModifiedHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#modifiedhistory) is not limited.

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

```csharp
public OpcNodeHistorian(OpcNodeManager owner, OpcVariableNode node)
```

</div>

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

```vbnet
Public Sub New(owner As OpcNodeManager, node As OpcVariableNode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `owner` | [OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/) | The [OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/) which provides the `node`. |
| `node` | [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) | The [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) whose history is maintained. |

**Remarks**

The constructor adds [HistoryReadOrWrite](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaccesslevel/#historyreadorwrite) to the [AccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#accesslevel) and [UserAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#useraccesslevel) of the `node` and sets its [IsHistorizing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#ishistorizing) to true.

#### OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int)

Initializes a new instance of the [OpcNodeHistorian](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/) class using the `owner`, `node` and `capacity` specified. The number of values kept in [ModifiedHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#modifiedhistory) is not limited.

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

```csharp
public OpcNodeHistorian(
    OpcNodeManager owner,
    OpcVariableNode node,
    int capacity)
```

</div>

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

```vbnet
Public Sub New(
    owner As OpcNodeManager,
    node As OpcVariableNode,
    capacity As Integer)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `owner` | [OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/) | The [OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/) which provides the `node`. |
| `node` | [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) | The [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) whose history is maintained. |
| `capacity` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The maximum number of values kept in [History](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#history): -1 (unlimited) or a positive number. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception) | The `capacity` is 0 or less than -1. |

**Remarks**

The constructor adds [HistoryReadOrWrite](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaccesslevel/#historyreadorwrite) to the [AccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#accesslevel) and [UserAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#useraccesslevel) of the `node` and sets its [IsHistorizing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#ishistorizing) to true.

#### OpcNodeHistorian(OpcNodeManager, OpcVariableNode, int, int)

Initializes a new instance of the [OpcNodeHistorian](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/) class using the `owner`, `node`, `capacity` and `modifiedCapacity` specified.

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

```csharp
public OpcNodeHistorian(
    OpcNodeManager owner,
    OpcVariableNode node,
    int capacity,
    int modifiedCapacity)
```

</div>

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

```vbnet
Public Sub New(
    owner As OpcNodeManager,
    node As OpcVariableNode,
    capacity As Integer,
    modifiedCapacity As Integer)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `owner` | [OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/) | The [OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/) which provides the `node`. |
| `node` | [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) | The [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) whose history is maintained. |
| `capacity` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The maximum number of values kept in [History](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#history): -1 (unlimited) or a positive number. |
| `modifiedCapacity` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The maximum number of values kept in [ModifiedHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#modifiedhistory): -1 (unlimited) or a positive number. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception) | The `capacity` or `modifiedCapacity` is 0 or less than -1. |

**Remarks**

The constructor adds [HistoryReadOrWrite](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaccesslevel/#historyreadorwrite) to the [AccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#accesslevel) and [UserAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#useraccesslevel) of the `node` and sets its [IsHistorizing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#ishistorizing) to true.

## Properties

### AutoUpdateHistory

Gets or sets a value indicating whether the historian adds the value of the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#node) to the [History](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#history) whenever the value of the node changes.

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

```csharp
public bool AutoUpdateHistory { get; set; }
```

</div>

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

```vbnet
Public Property AutoUpdateHistory As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true to add the value of the node to the history on each change; otherwise the value false. The default value is false.

**Remarks**

The value is added when the changes of the node are applied (see [BeforeApplyChanges](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members#beforeapplychanges)) and the node has a [Timestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#timestamp); a value at the same timestamp is replaced. The [ModifiedHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#modifiedhistory) is not changed.

### History

Gets the history of the values of the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#node).

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

```csharp
public OpcNodeHistory<OpcHistoryValue> History { get; }
```

</div>

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

```vbnet
Public ReadOnly Property History As OpcNodeHistory(Of OpcHistoryValue)
```

</div>

**Property value**

[OpcNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistory-1/)&lt;[OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/)&gt;

The [OpcNodeHistory&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistory-1/) with the values of the node.

### ModifiedHistory

Gets the history of the modifications of the [History](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#history) through the history services.

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

```csharp
public OpcModifiedNodeHistory ModifiedHistory { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ModifiedHistory As OpcModifiedNodeHistory
```

</div>

**Property value**

[OpcModifiedNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcmodifiednodehistory/)

The [OpcModifiedNodeHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcmodifiednodehistory/) with one [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) per value created, replaced or deleted. For a replaced value it holds the value before the replacement. Its timestamp is the time of the modification.

### Node

Gets the node whose history the historian maintains.

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

```csharp
public OpcVariableNode Node { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Node As OpcVariableNode
```

</div>

**Property value**

[OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/)

The [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/) whose history is maintained.

**Implements**

[Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#node)

### Owner

Gets the node manager which provides the [Node](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#node).

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

```csharp
public OpcNodeManager Owner { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Owner As OpcNodeManager
```

</div>

**Property value**

[OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/)

The [OpcNodeManager](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodemanager/) which provides the node.

### SyncRoot

Gets the object used to synchronize the access to the historian.

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

```csharp
public object SyncRoot { get; }
```

</div>

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

```vbnet
Public ReadOnly Property SyncRoot As Object
```

</div>

**Property value**

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

The object which the historian locks while it reads or changes the history on behalf of the history services.

## Methods

### CreateHistory

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

```csharp
public OpcStatusCollection CreateHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
```

</div>

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

```vbnet
Public Function CreateHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) |  |
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) |  |
| `values` | [OpcValueCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvaluecollection/) |  |

**Returns**

[OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

**Implements**

[CreateHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#createhistory)

### DeleteHistory

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

| Overload | Description |
|---|---|
| [DeleteHistory(OpcContext, OpcHistoryModificationInfo, IEnumerable&lt;DateTime&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#deletehistory-opc-uafx-opccontext-opc-uafx-opchistorymodificationinfo-system-collections-generic-ienumerable-of-system-datetime) |  |
| [DeleteHistory(OpcContext, OpcHistoryModificationInfo, OpcValueCollection)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#deletehistory-opc-uafx-opccontext-opc-uafx-opchistorymodificationinfo-opc-uafx-opcvaluecollection) |  |
| [DeleteHistory(OpcContext, OpcHistoryModificationInfo, DateTime?, DateTime?, OpcDeleteHistoryOptions)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcnodehistorian/members#deletehistory-opc-uafx-opccontext-opc-uafx-opchistorymodificationinfo-system-nullable-of-system-datetime-system-nullable-of-system-datetime-opc-uafx-server-opcdeletehistoryoptions) |  |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

#### DeleteHistory(OpcContext, OpcHistoryModificationInfo, IEnumerable&lt;DateTime&gt;)

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

```csharp
public OpcStatusCollection DeleteHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    IEnumerable<DateTime> times)
```

</div>

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

```vbnet
Public Function DeleteHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    times As IEnumerable(Of Date)) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) |  |
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) |  |
| `times` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; |  |

**Returns**

[OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)

**Implements**

[DeleteHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#deletehistory-opc-uafx-opccontext-opc-uafx-opchistorymodificationinfo-system-collections-generic-ienumerable-of-system-datetime)

#### DeleteHistory(OpcContext, OpcHistoryModificationInfo, OpcValueCollection)

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

```csharp
public OpcStatusCollection DeleteHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
```

</div>

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

```vbnet
Public Function DeleteHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) |  |
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) |  |
| `values` | [OpcValueCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvaluecollection/) |  |

**Returns**

[OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)

**Implements**

[DeleteHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#deletehistory-opc-uafx-opccontext-opc-uafx-opchistorymodificationinfo-opc-uafx-opcvaluecollection)

#### DeleteHistory(OpcContext, OpcHistoryModificationInfo, DateTime?, DateTime?, OpcDeleteHistoryOptions)

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

```csharp
public OpcStatusCollection DeleteHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    DateTime? startTime,
    DateTime? endTime,
    OpcDeleteHistoryOptions options)
```

</div>

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

```vbnet
Public Function DeleteHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    startTime As Date?,
    endTime As Date?,
    options As OpcDeleteHistoryOptions) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) |  |
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) |  |
| `startTime` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; |  |
| `endTime` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; |  |
| `options` | [OpcDeleteHistoryOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcdeletehistoryoptions/) |  |

**Returns**

[OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)

**Implements**

[DeleteHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#deletehistory-opc-uafx-opccontext-opc-uafx-opchistorymodificationinfo-system-nullable-of-system-datetime-system-nullable-of-system-datetime-opc-uafx-server-opcdeletehistoryoptions)

### ReadHistory

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

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

```csharp
public IEnumerable<OpcHistoryValue> ReadHistory(
    OpcContext context,
    DateTime? startTime,
    DateTime? endTime,
    bool timeFlowsBackward,
    uint? maxCount,
    OpcReadHistoryOptions options)
```

</div>

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

```vbnet
Public Function ReadHistory(
    context As OpcContext,
    startTime As Date?,
    endTime As Date?,
    timeFlowsBackward As Boolean,
    maxCount As UInteger?,
    options As OpcReadHistoryOptions) As IEnumerable(Of OpcHistoryValue)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) |  |
| `startTime` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; |  |
| `endTime` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)&gt; |  |
| `timeFlowsBackward` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) |  |
| `maxCount` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[UInt32](https://learn.microsoft.com/dotnet/api/system.uint32)&gt; |  |
| `options` | [OpcReadHistoryOptions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcreadhistoryoptions/) |  |

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/)&gt;

**Implements**

[ReadHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#readhistory)

### ReplaceHistory

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

```csharp
public OpcStatusCollection ReplaceHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
```

</div>

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

```vbnet
Public Function ReplaceHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) |  |
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) |  |
| `values` | [OpcValueCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvaluecollection/) |  |

**Returns**

[OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

**Implements**

[ReplaceHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#replacehistory)

### UpdateHistory

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

```csharp
public OpcStatusCollection UpdateHistory(
    OpcContext context,
    OpcHistoryModificationInfo modificationInfo,
    OpcValueCollection values)
```

</div>

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

```vbnet
Public Function UpdateHistory(
    context As OpcContext,
    modificationInfo As OpcHistoryModificationInfo,
    values As OpcValueCollection) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) |  |
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) |  |
| `values` | [OpcValueCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvaluecollection/) |  |

**Returns**

[OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/)

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) |  |

**Implements**

[UpdateHistory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.iopcnodehistoryprovider/members#updatehistory)
