Table of Contents

Class CommandRegistration

Namespace
The.Web.Pages
Assembly
Instagile.Web.Client.dll
public class CommandRegistration : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IAsyncDisposable
Inheritance
CommandRegistration
Implements
Inherited Members

Properties

Add

Add commands once.

[Parameter]
public Func<ICommandContext, IEnumerable<Command>>? Add { get; set; }

Property Value

Func<ICommandContext, IEnumerable<Command>>

AddAsync

Add commands once.

[Parameter]
public Func<ICommandContext, IAsyncEnumerable<Command>>? AddAsync { get; set; }

Property Value

Func<ICommandContext, IAsyncEnumerable<Command>>

OnCleanup

Called whenever commands are removed, due to dispose or replace.

[Parameter]
public EventCallback<ICommandContext> OnCleanup { get; set; }

Property Value

EventCallback<ICommandContext>

Replace

Add or re-add commands when rendered - use with @key.

[Parameter]
public Func<ICommandContext, IEnumerable<Command>>? Replace { get; set; }

Property Value

Func<ICommandContext, IEnumerable<Command>>

ReplaceAsync

Add or re-add commands when rendered - use with @key.

[Parameter]
public Func<ICommandContext, IAsyncEnumerable<Command>>? ReplaceAsync { get; set; }

Property Value

Func<ICommandContext, IAsyncEnumerable<Command>>

Reset

Remove existing commands once.

[Parameter]
public bool Reset { get; set; }

Property Value

bool

Validate

Install the edit surface's validation session, through which gated commands validate.

[Parameter]
public ValidationSession? Validate { get; set; }

Property Value

ValidationSession

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous dispose operation.

OnParametersSetAsync()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

protected override Task OnParametersSetAsync()

Returns

Task

A Task representing any asynchronous operation.