Definition
Assembly: CloudNimble.BlazorEssentials.dll
Namespace: CloudNimble.BlazorEssentials.Merlin
Inheritance: CloudNimble.BlazorEssentials.BlazorObservable
Syntax
CloudNimble . BlazorEssentials . Merlin . Operation
Summary
A class with observable elements to describe the different components of reporting operation progress to an end user.
Constructors
.ctor
Syntax
public Operation ( string title , System . Collections . Generic . IEnumerable < CloudNimble . BlazorEssentials . Merlin . OperationStep > steps , string successText , string failureText , string inProgressText = "Working..." , string notStartedText = "" , bool shouldObserveStatus = true )
Parameters
Name Type Description
titlestring- stepsSystem.Collections.Generic.IEnumerable<CloudNimble.BlazorEssentials.Merlin.OperationStep>- successTextstringInitializer for the Success value on the DisplayText property. failureTextstringInitializer for the Failure value on the DisplayText property. inProgressTextstringInitializer for the InProgress value on the DisplayText property. notStartedTextstringInitializer for the NotStarted value on the DisplayText property. shouldObserveStatusboolInitializer for internal flag indicating if the control should trigger the StateHasChanged action in the BlazorObservable when the OperationStatus changes.
.ctor Inherited
Inherited from CloudNimble.BlazorEssentials.BlazorObservable
Creates a new instance of the BlazorObservable class.
Syntax
public BlazorObservable ( CloudNimble . BlazorEssentials . StateHasChangedConfig stateHasChangedConfig = null )
Parameters
Name Type Description
stateHasChangedConfigCloudNimble.BlazorEssentials.StateHasChangedConfig-
Properties
CurrentIcon
A computed string that determines what the icon should be as the Steps change.
Syntax
public string CurrentIcon { get ; set ; }
Property Value
Type: string
CurrentIconColor
A computed string that determines what the icon color should be as the Steps change.
Syntax
public string CurrentIconColor { get ; set ; }
Property Value
Type: string
CurrentProgressClass
A computed string containing the DisplayText for the currently running OperationStep.
Syntax
public string CurrentProgressClass { get ; set ; }
Property Value
Type: string
DisplayIcon
The icon to display to the end user through the Operation lifecycle.
Syntax
public CloudNimble . BlazorEssentials . Merlin . OperationStatusDisplay DisplayIcon { get ; set ; }
Property Value
Type: CloudNimble.BlazorEssentials.Merlin.OperationStatusDisplay
This property is is not observable.
DisplayIconColor
The colors to use for the Operation.CurrentIcon through the Operation lifecycle.
Syntax
public CloudNimble . BlazorEssentials . Merlin . OperationStatusDisplay DisplayIconColor { get ; set ; }
Property Value
Type: CloudNimble.BlazorEssentials.Merlin.OperationStatusDisplay
This property is is not observable.
DisplayProgressClass
The CSS Class to use for the Alert’s background through the Operation lifecycle.
Syntax
public CloudNimble . BlazorEssentials . Merlin . OperationStatusDisplay DisplayProgressClass { get ; set ; }
Property Value
Type: CloudNimble.BlazorEssentials.Merlin.OperationStatusDisplay
This property is is not observable.
DisplayText
The text to display to the end user through the Operation lifecycle.
Syntax
public CloudNimble . BlazorEssentials . Merlin . OperationStatusDisplay DisplayText { get ; set ; }
Property Value
Type: CloudNimble.BlazorEssentials.Merlin.OperationStatusDisplay
This property is is not observable.
LoadingStatus Inherited
Inherited from CloudNimble.BlazorEssentials.BlazorObservable
A BlazorObservable.LoadingStatus specifying the current state of the required data for this Observable.
Syntax
public CloudNimble . BlazorEssentials . LoadingStatus LoadingStatus { get ; set ; }
Property Value
Type: CloudNimble.BlazorEssentials.LoadingStatus
ProgressPercent
A computed number containing the percentage of all the OperationSteps in the “Succeeded” status.
Syntax
public System . Decimal ProgressPercent { get ; set ; }
Property Value
Type: System.Decimal
ProgressText
A computed string containing the DisplayText for the currently running OperationStep.
Syntax
public string ProgressText { get ; set ; }
Property Value
Type: string
ResultText
A computed string that determines if we display the SuccessText or FailureText based on the collective outcome of all the Steps.
Syntax
public string ResultText { get ; set ; }
Property Value
Type: string
ShowPanel
A computed boolean specifying whether or not the <div> showing the status of this Operation should be displayed.
Syntax
public bool ShowPanel { get ; set ; }
Property Value
Type: bool
StateHasChanged Inherited
Inherited from CloudNimble.BlazorEssentials.BlazorObservable
Determines how to trigger StateHasChanged events in a Blazor component.
Syntax
public CloudNimble . BlazorEssentials . StateHasChangedConfig StateHasChanged { get ; set ; }
Property Value
Type: CloudNimble.BlazorEssentials.StateHasChangedConfig
Status
A computed boolean specifying whether or not ALL of the OperationSteps are successful.
Syntax
public CloudNimble . BlazorEssentials . Merlin . OperationStatus Status { get ; private set ; }
Property Value
Type: CloudNimble.BlazorEssentials.Merlin.OperationStatus
Steps
A ObservableCollection`1 containing the different steps of the Operation.
Syntax
public System . Collections . ObjectModel . ObservableCollection < CloudNimble . BlazorEssentials . Merlin . OperationStep > Steps { get ; set ; }
Property Value
Type: System.Collections.ObjectModel.ObservableCollection<CloudNimble.BlazorEssentials.Merlin.OperationStep>
Title
The text to display to the end user regarding what is happening in this step.
Syntax
public string Title { get ; set ; }
Property Value
Type: string
Methods
Dispose Override
Inherited from CloudNimble.BlazorEssentials.BlazorObservable
Syntax
protected override void Dispose ( bool disposing )
Parameters
Name Type Description
disposingbool-
ReplaceSteps
Syntax
public void ReplaceSteps ( System . Collections . Generic . List < CloudNimble . BlazorEssentials . Merlin . OperationStep > steps )
Parameters
Name Type Description
stepsSystem.Collections.Generic.List<CloudNimble.BlazorEssentials.Merlin.OperationStep>-
Reset
Changes all of the Steps back to “NotStarted” so the Operation can be run again.
Syntax
Start
Starts the Operation, looping through each step until it is finished or until a step fails.
Syntax
UpdateStep
Modify the status of a specific OperationStep .
Syntax
public void UpdateStep ( int id , CloudNimble . BlazorEssentials . Merlin . OperationStepStatus status , string errorText )
Parameters
Name Type Description
idintOperationStep identifier.statusCloudNimble.BlazorEssentials.Merlin.OperationStepStatusNew OperationStepStatus . errorTextstringNew value for the ErrorText property on the OperationStep .