Class ScreenCommandFactory
public static class ScreenCommandFactory
- Inheritance
-
ScreenCommandFactory
- Inherited Members
Methods
CreateAsyncCommand(Func<ISurface>, string, Func<Task>, string?, bool)
public static IScreenCommand CreateAsyncCommand(Func<ISurface> getSurface, string name, Func<Task> asyncAction, string? completeNotification = null, bool requiresEditableContext = false)
Parameters
getSurfaceFunc<ISurface>namestringasyncActionFunc<Task>completeNotificationstringrequiresEditableContextbool
Returns
CreateAsyncCommand(ISurface, string, Func<Task>, string?, bool)
public static IScreenCommand CreateAsyncCommand(ISurface surface, string name, Func<Task> asyncAction, string? completeNotification = null, bool requiresEditableContext = false)
Parameters
surfaceISurfacenamestringasyncActionFunc<Task>completeNotificationstringrequiresEditableContextbool
Returns
CreateCommand(Func<ISurface>, string, Action, string?, bool)
public static IScreenCommand CreateCommand(Func<ISurface> getSurface, string name, Action action, string? completeNotification = null, bool requiresEditableContext = false)
Parameters
getSurfaceFunc<ISurface>namestringactionActioncompleteNotificationstringrequiresEditableContextbool
Returns
CreateCommand(ISurface, string, Action, string?, bool)
public static IScreenCommand CreateCommand(ISurface surface, string name, Action action, string? completeNotification = null, bool requiresEditableContext = false)
Parameters
Returns
CreateValidatedAsyncCommand(Func<ISurface>, string, Func<Task>, Func<ValidationSession?>, ValidationIntent?, MessageLevel)
Create an async command gated by a ValidationSession: before the action runs, CheckAsync(ISurface, string, ValidationSession?, ValidationIntent?, MessageLevel) validates under the command's intent and blocks at the given level.
public static IScreenCommand CreateValidatedAsyncCommand(Func<ISurface> getSurface, string name, Func<Task> asyncAction, Func<ValidationSession?> validation, ValidationIntent? intent = null, MessageLevel blockAt = MessageLevel.Error)
Parameters
getSurfaceFunc<ISurface>namestringasyncActionFunc<Task>validationFunc<ValidationSession>intentValidationIntent?blockAtMessageLevel
Returns
CreateValidatedAsyncCommand(ISurface, string, Func<Task>, Func<ValidationSession?>, ValidationIntent?, MessageLevel)
Create an async command gated by a ValidationSession: before the action runs, CheckAsync(ISurface, string, ValidationSession?, ValidationIntent?, MessageLevel) validates under the command's intent and blocks at the given level.
public static IScreenCommand CreateValidatedAsyncCommand(ISurface surface, string name, Func<Task> asyncAction, Func<ValidationSession?> validation, ValidationIntent? intent = null, MessageLevel blockAt = MessageLevel.Error)
Parameters
surfaceISurfacenamestringasyncActionFunc<Task>validationFunc<ValidationSession>intentValidationIntent?blockAtMessageLevel
Returns
CreateValidatedCommand(Func<ISurface>, string, Action, Func<ValidationSession?>, ValidationIntent?, MessageLevel)
Create a command gated by a ValidationSession: before the action runs, CheckAsync(ISurface, string, ValidationSession?, ValidationIntent?, MessageLevel) validates under the command's intent and blocks at the given level.
public static IScreenCommand CreateValidatedCommand(Func<ISurface> getSurface, string name, Action action, Func<ValidationSession?> validation, ValidationIntent? intent = null, MessageLevel blockAt = MessageLevel.Error)
Parameters
getSurfaceFunc<ISurface>namestringactionActionvalidationFunc<ValidationSession>intentValidationIntent?blockAtMessageLevel
Returns
CreateValidatedCommand(ISurface, string, Action, Func<ValidationSession?>, ValidationIntent?, MessageLevel)
Create a command gated by a ValidationSession: before the action runs, CheckAsync(ISurface, string, ValidationSession?, ValidationIntent?, MessageLevel) validates under the command's intent and blocks at the given level.
public static IScreenCommand CreateValidatedCommand(ISurface surface, string name, Action action, Func<ValidationSession?> validation, ValidationIntent? intent = null, MessageLevel blockAt = MessageLevel.Error)
Parameters
surfaceISurfacenamestringactionActionvalidationFunc<ValidationSession>intentValidationIntent?blockAtMessageLevel
Returns
WrapCommand(ISurface, IScreenCommand, Func<Func<Task>, Task>)
public static IScreenCommand WrapCommand(ISurface surface, IScreenCommand wrappedCommand, Func<Func<Task>, Task> wrappingAction)