Table of Contents

Class ScreenCommandFactory

Namespace
The.WPF.Screens
Assembly
Instagile.WPF.dll
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

getSurface Func<ISurface>
name string
asyncAction Func<Task>
completeNotification string
requiresEditableContext bool

Returns

IScreenCommand

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

surface ISurface
name string
asyncAction Func<Task>
completeNotification string
requiresEditableContext bool

Returns

IScreenCommand

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

getSurface Func<ISurface>
name string
action Action
completeNotification string
requiresEditableContext bool

Returns

IScreenCommand

CreateCommand(ISurface, string, Action, string?, bool)

public static IScreenCommand CreateCommand(ISurface surface, string name, Action action, string? completeNotification = null, bool requiresEditableContext = false)

Parameters

surface ISurface
name string
action Action
completeNotification string
requiresEditableContext bool

Returns

IScreenCommand

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

getSurface Func<ISurface>
name string
asyncAction Func<Task>
validation Func<ValidationSession>
intent ValidationIntent?
blockAt MessageLevel

Returns

IScreenCommand

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

surface ISurface
name string
asyncAction Func<Task>
validation Func<ValidationSession>
intent ValidationIntent?
blockAt MessageLevel

Returns

IScreenCommand

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

getSurface Func<ISurface>
name string
action Action
validation Func<ValidationSession>
intent ValidationIntent?
blockAt MessageLevel

Returns

IScreenCommand

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

surface ISurface
name string
action Action
validation Func<ValidationSession>
intent ValidationIntent?
blockAt MessageLevel

Returns

IScreenCommand

WrapCommand(ISurface, IScreenCommand, Func<Func<Task>, Task>)

public static IScreenCommand WrapCommand(ISurface surface, IScreenCommand wrappedCommand, Func<Func<Task>, Task> wrappingAction)

Parameters

surface ISurface
wrappedCommand IScreenCommand
wrappingAction Func<Func<Task>, Task>

Returns

IScreenCommand