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

# OperationStep

## Definition

**Assembly:** CloudNimble.BlazorEssentials.dll

**Namespace:** CloudNimble.BlazorEssentials.Merlin

**Inheritance:** CloudNimble.BlazorEssentials.BlazorObservable

## Syntax

```csharp theme={"dark"}
CloudNimble.BlazorEssentials.Merlin.OperationStep
```

## Constructors

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

#### Syntax

```csharp theme={"dark"}
public OperationStep(int id, string displayText, System.Func<System.Threading.Tasks.Task<bool>> onAction)
```

#### Parameters

| Name          | Type                                             | Description |
| ------------- | ------------------------------------------------ | ----------- |
| `id`          | `int`                                            | -           |
| `displayText` | `string`                                         | -           |
| `onAction`    | `System.Func<System.Threading.Tasks.Task<bool>>` | -           |

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

<Note>Inherited from `CloudNimble.BlazorEssentials.BlazorObservable`</Note>

Creates a new instance of the [BlazorObservable](/blazoressentials/api-reference/CloudNimble/BlazorEssentials/BlazorObservable) class.

#### Syntax

```csharp theme={"dark"}
public BlazorObservable(CloudNimble.BlazorEssentials.StateHasChangedConfig stateHasChangedConfig = null)
```

#### Parameters

| Name                    | Type                                                 | Description |
| ----------------------- | ---------------------------------------------------- | ----------- |
| `stateHasChangedConfig` | `CloudNimble.BlazorEssentials.StateHasChangedConfig` | -           |

## Properties

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

The text to display to the end user regarding what is happening in this step.

#### Syntax

```csharp theme={"dark"}
public string DisplayText { get; set; }
```

#### Property Value

Type: `string`

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

Any additional text you'd like to display to the end user when there is an error.

#### Syntax

```csharp theme={"dark"}
public string ErrorText { get; set; }
```

#### Property Value

Type: `string`

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

A zero-based index identifying this step in relation to other steps in the process.

#### Syntax

```csharp theme={"dark"}
public int Id { get; set; }
```

#### Property Value

Type: `int`

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

Returns a Bootstrap Label with the details of the a given [OperationStep.Status](/blazoressentials/api-reference/CloudNimble/BlazorEssentials/Merlin/OperationStep#status).

#### Syntax

```csharp theme={"dark"}
public string Label { get; set; }
```

#### Property Value

Type: `string`

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

<Note>Inherited from `CloudNimble.BlazorEssentials.BlazorObservable`</Note>

A [BlazorObservable.LoadingStatus](/blazoressentials/api-reference/CloudNimble/BlazorEssentials/BlazorObservable#loadingstatus) specifying the current state of the required data for this Observable.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.LoadingStatus LoadingStatus { get; set; }
```

#### Property Value

Type: `CloudNimble.BlazorEssentials.LoadingStatus`

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

An async function that returns a boolean indicating whether or not the action succeeded.

#### Syntax

```csharp theme={"dark"}
public System.Func<System.Threading.Tasks.Task<bool>> OnAction { get; set; }
```

#### Property Value

Type: `System.Func<System.Threading.Tasks.Task<bool>>`

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

<Note>Inherited from `CloudNimble.BlazorEssentials.BlazorObservable`</Note>

Determines how to trigger StateHasChanged events in a Blazor component.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.StateHasChangedConfig StateHasChanged { get; set; }
```

#### Property Value

Type: `CloudNimble.BlazorEssentials.StateHasChangedConfig`

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

An OperationStepStatus where you can change the operation's status and the UI is re-rendered automatically.

#### Syntax

```csharp theme={"dark"}
public CloudNimble.BlazorEssentials.Merlin.OperationStepStatus Status { get; set; }
```

#### Property Value

Type: `CloudNimble.BlazorEssentials.Merlin.OperationStepStatus`

## Methods

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Dispose <Badge color="blue">Override</Badge>

<Note>Inherited from `CloudNimble.BlazorEssentials.BlazorObservable`</Note>

#### Syntax

```csharp theme={"dark"}
protected override void Dispose(bool disposing)
```

#### Parameters

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| `disposing` | `bool` | -           |

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

Resets the status of the OperationStep in the event it needs to run again.

#### Syntax

```csharp theme={"dark"}
public void Reset()
```

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

The Action that the Operation calls to trigger a Step. It wrapps the call to onAction with status update logic.

#### Syntax

```csharp theme={"dark"}
public System.Threading.Tasks.Task Start()
```

#### Returns

Type: `System.Threading.Tasks.Task`
