Table of Contents

Class ExceptionHandlingRelayCommand

Namespace
Loehnert.Lisrt.Framework
Assembly
Loehnert.Lisrt.dll

Represents a relay command, which swallows all exceptions and logs them using the ShowException(Exception, ILogger) method.

public class ExceptionHandlingRelayCommand : RelayCommand, ICommand
Inheritance
ExceptionHandlingRelayCommand
Implements
Inherited Members

Constructors

ExceptionHandlingRelayCommand(Action<object>)

Initializes a new instance of the ExceptionHandlingRelayCommand class.

public ExceptionHandlingRelayCommand(Action<object> execute)

Parameters

execute Action<object>

The action to execute.

ExceptionHandlingRelayCommand(Action<object>, Predicate<object>)

Initializes a new instance of the ExceptionHandlingRelayCommand class.

public ExceptionHandlingRelayCommand(Action<object> execute, Predicate<object> canExecute)

Parameters

execute Action<object>

The action to execute.

canExecute Predicate<object>

The method that determines whether the command can be executed.

Methods

CanExecute(object)

Tries to execute the method that determines whether the command can be executed.

public override bool CanExecute(object parameter)

Parameters

parameter object

Data used by the command.

Returns

bool

true if this command can be executed; otherwise, false.

Execute(object)

Tries to execute the set action.

public override void Execute(object parameter)

Parameters

parameter object

Data used by the command.