Class ShellCommand<T>
public sealed class ShellCommand<T> : ShellCommand, ICommand
Type Parameters
T
- Inheritance
-
ShellCommand<T>
- Implements
- Inherited Members
Constructors
ShellCommand(ISurface, Action<T>, Action<EventHandler>)
public ShellCommand(ISurface surface, Action<T> execute, Action<EventHandler> subscribe = null)
Parameters
surfaceISurfaceUI element which should handle errors.
executeAction<T>Action to run when command is invoked.
subscribeAction<EventHandler>Optional. An Action<T> to use to subscribe to an event. The subscription will be stored in case the event uses the weak event pattern. When the event is raised, CanExecuteChanged will be raised. If null, no subscription will take place.
ShellCommand(ISurface, Action<T>, Func<T, bool>, Action<EventHandler>)
public ShellCommand(ISurface surface, Action<T> execute, Func<T, bool> canExecute, Action<EventHandler> subscribe = null)
Parameters
surfaceISurfaceUI element which should handle errors.
executeAction<T>Action to run when command is invoked.
canExecuteFunc<T, bool>Optional. Synchronous enablement test.
subscribeAction<EventHandler>Optional. An Action<T> to use to subscribe to an event. The subscription will be stored in case the event uses the weak event pattern. When the event is raised, CanExecuteChanged will be raised. If null, no subscription will take place.