mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-02 18:39:14 +00:00
misc: Swap the context menu actions to Commands
This commit is contained in:
@@ -9,12 +9,12 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
public static RelayCommand Create(Action action)
|
||||
=> new(action);
|
||||
public static RelayCommand CreateConditional(Action action, Func<bool> canExecute)
|
||||
public static RelayCommand CreateConditional(Func<bool> canExecute, Action action)
|
||||
=> new(action, canExecute);
|
||||
|
||||
public static RelayCommand<T> Create<T>(Action<T?> action)
|
||||
=> new(action);
|
||||
public static RelayCommand<T> CreateConditional<T>(Action<T?> action, Predicate<T?> canExecute)
|
||||
public static RelayCommand<T> CreateConditional<T>(Predicate<T?> canExecute, Action<T?> action)
|
||||
=> new(action, canExecute);
|
||||
|
||||
public static AsyncRelayCommand Create(Func<Task> action)
|
||||
@@ -31,18 +31,18 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
public static AsyncRelayCommand<T> CreateSilentFail<T>(Func<T?, Task> action)
|
||||
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||
|
||||
public static AsyncRelayCommand CreateConditional(Func<Task> action, Func<bool> canExecute)
|
||||
public static AsyncRelayCommand CreateConditional(Func<bool> canExecute, Func<Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.None);
|
||||
public static AsyncRelayCommand CreateConcurrentConditional(Func<Task> action, Func<bool> canExecute)
|
||||
public static AsyncRelayCommand CreateConcurrentConditional(Func<bool> canExecute, Func<Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||
public static AsyncRelayCommand CreateSilentFailConditional(Func<Task> action, Func<bool> canExecute)
|
||||
public static AsyncRelayCommand CreateSilentFailConditional(Func<bool> canExecute, Func<Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||
|
||||
public static AsyncRelayCommand<T> CreateConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||
public static AsyncRelayCommand<T> CreateConditional<T>(Predicate<T?> canExecute, Func<T?, Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.None);
|
||||
public static AsyncRelayCommand<T> CreateConcurrentConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||
public static AsyncRelayCommand<T> CreateConcurrentConditional<T>(Predicate<T?> canExecute, Func<T?, Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||
public static AsyncRelayCommand<T> CreateSilentFailConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||
public static AsyncRelayCommand<T> CreateSilentFailConditional<T>(Predicate<T?> canExecute, Func<T?, Task> action)
|
||||
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user