Class
CompositeAsyncStateCommand

Represents a composite async command.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
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

CompositeAsyncStateCommand(string, Action<object>, Action<object>, Predicate<object>)

Initializes a new instance of the CompositeAsyncStateCommand class.

Declaration

cs-api-definition
public CompositeAsyncStateCommand(string name, Action<object> execute = null, Action<object> undo = null, Predicate<object> canExecute = null)

Parameters

name

string

The name or title of the composite action.

execute

Action<object>

The execute action.

undo

Action<object>

The undo action.

canExecute

Predicate<object>

The CanExecute action.

Properties

IsCommited

Gets a value indicating whether this instance is committed.

Declaration

cs-api-definition
public bool IsCommited { get; }

Property Value

bool

Implements IAsyncStateCommand.IsCommited

Methods

AddCommand(ICommand, object)

Adds a command to the composite command.

Declaration

cs-api-definition
public void AddCommand(ICommand command, object state)

Parameters

command

ICommand

state

object

Complete(bool, object)

Completes the execution.

Declaration

cs-api-definition
public void Complete(bool commit, object state)

Parameters

commit

bool

True, if the command should be committed.

state

object

The state.

Implements IAsyncStateCommand.Complete(bool, object)

Execute(object)

Executes the specified state.

Declaration

cs-api-definition
public override void Execute(object state = null)

Parameters

state

object

The state associated with the execution.

Overrides CompositeCommand.Execute(object)

Implements ICommand.Execute(object)

InsertCommand(int, ICommand, object)

Inserts a command into the composite command at specific index.

Declaration

cs-api-definition
public void InsertCommand(int index, ICommand command, object state)

Parameters

index

int

command

ICommand

state

object

Undo(object)

Unwinds an undoable action.

Declaration

cs-api-definition
public override void Undo(object state = null)

Parameters

state

object

Overrides CompositeCommand.Undo(object)

Implements ICommand.Undo(object)

Events

Completed

Occurs when the command is completed.

Declaration

cs-api-definition
public event EventHandler Completed

Event Value

EventHandler

Implements IAsyncStateCommand.Completed