> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# NavigationHistory

## Definition

**Assembly:** CloudNimble.BlazorEssentials.dll

**Namespace:** CloudNimble.BlazorEssentials.Navigation

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.BlazorEssentials.Navigation.NavigationHistory
```

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={"dark"}
public NavigationHistory(Microsoft.JSInterop.IJSRuntime jsRuntime)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `jsRuntime` | `Microsoft.JSInterop.IJSRuntime` | - |

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Methods

### &#x20;Back

This asynchronous method goes to the previous page in session history.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask Back()
```

#### Returns

Type: `System.Threading.Tasks.ValueTask`

### &#x20;Count

Returns an Integer representing the number of elements in the session history, including the currently loaded page.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask<int> Count()
```

#### Returns

Type: `System.Threading.Tasks.ValueTask<int>`

### &#x20;CurrentState

Returns an *T* type representing the state at the top of the history stack.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask<T> CurrentState<T>()
```

#### Returns

Type: `System.Threading.Tasks.ValueTask<T>`

#### Type Parameters

* `T` - The type of the state data

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Forward

This asynchronous method goes to the next page in session history.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask Forward()
```

#### Returns

Type: `System.Threading.Tasks.ValueTask`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetScrollRestoration

Allows web applications to explicitly get default scroll restoration behavior on history navigation.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask<CloudNimble.BlazorEssentials.Navigation.ScrollRestorationType> GetScrollRestoration()
```

#### Returns

Type: `System.Threading.Tasks.ValueTask<CloudNimble.BlazorEssentials.Navigation.ScrollRestorationType>`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;Go

Asynchronously loads a page from the session history, identified by its relative location to the current page.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask Go(int index)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `index` | `int` | The index to move back or forward |

#### Returns

Type: `System.Threading.Tasks.ValueTask`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;PushState

Pushes the given data onto the session history stack.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask PushState<T>(T state, string url)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `state` | `T` | The state of the data |
| `url` | `string` | The url to navigate |

#### Returns

Type: `System.Threading.Tasks.ValueTask`

#### Type Parameters

* `T` - The type of the state data

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ReplaceState

Updates the most recent entry on the history stack.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask ReplaceState<T>(T state, string url)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `state` | `T` | The state of the data |
| `url` | `string` | The url to navigate |

#### Returns

Type: `System.Threading.Tasks.ValueTask`

#### Type Parameters

* `T` - The type of the state data

### &#x20;SetScrollRestoration

Allows web applications to explicitly set default scroll restoration behavior on history navigation. This property can be either auto or manual.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.ValueTask SetScrollRestoration(CloudNimble.BlazorEssentials.Navigation.ScrollRestorationType scrollRestorationType)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `scrollRestorationType` | `CloudNimble.BlazorEssentials.Navigation.ScrollRestorationType` | - |

#### Returns

Type: `System.Threading.Tasks.ValueTask`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.