New to Telerik UI for WinFormsStart a free 30-day trial

Represents a composite async command.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public class CompositeAsyncStateCommand : CompositeCommand, IAsyncStateCommand, ICommand

Inheritance: objectUndoableDelegateCommandCompositeCommandCompositeAsyncStateCommand

Implements: IAsyncStateCommandICommand

Inherited Members CompositeCommand.Redo()CompositeCommand.CanExecute(object)CompositeCommand.AddCommand(ICommand)CompositeCommand.InsertCommand(int, ICommand)CompositeCommand.RemoveCommand(ICommand)CompositeCommand.Clear()CompositeCommand.CommandsUndoableDelegateCommand.Name...

Constructors

Initializes a new instance of the CompositeAsyncStateCommand class.

C#
public CompositeAsyncStateCommand(string name, Action<object> execute = null, Action<object> undo = null, Predicate<object> canExecute = null)
Parameters:namestring

The name or title of the composite action.

executeAction<object>

The execute action.

undoAction<object>

The undo action.

canExecutePredicate<object>

The CanExecute action.

Properties

Gets a value indicating whether this instance is committed.

C#
public bool IsCommited { get; }

Implements: IAsyncStateCommand.IsCommited

Methods

Adds a command to the composite command.

C#
public void AddCommand(ICommand command, object state)
Parameters:commandICommandstateobject

Completes the execution.

C#
public void Complete(bool commit, object state)
Parameters:commitbool

True, if the command should be committed.

stateobject

The state.

Implements: IAsyncStateCommand.Complete(bool, object)

Executes the specified state.

C#
public override void Execute(object state = null)
Parameters:stateobject

The state associated with the execution.

Overrides: CompositeCommand.Execute(object)

Implements: ICommand.Execute(object)

Inserts a command into the composite command at specific index.

C#
public void InsertCommand(int index, ICommand command, object state)
Parameters:indexintcommandICommandstateobject

Unwinds an undoable action.

C#
public override void Undo(object state = null)
Parameters:stateobject

Overrides: CompositeCommand.Undo(object)

Implements: ICommand.Undo(object)

Events

Occurs when the command is completed.

C#
public event EventHandler Completed

Implements: IAsyncStateCommand.Completed