> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/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

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

#### Syntax

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

#### Parameters

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

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

## Methods

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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>`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

#### Parameters

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

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

#### Parameters

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

#### Returns

Type: `bool`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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`

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetHashCode <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

#### Returns

Type: `int`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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>`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetType <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

#### Returns

Type: `System.Type`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> MemberwiseClone <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

#### Returns

Type: `object`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ReferenceEquals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

#### Parameters

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

#### Returns

Type: `bool`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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`

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> ToString <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

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

#### Returns

Type: `string?`
