Use target typed new in commands
This commit is contained in:
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class CloseTabCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "close_tab";
|
||||
public static CloseTabCommand Instance { get; } = new CloseTabCommand();
|
||||
public static CloseTabCommand Instance { get; } = new();
|
||||
|
||||
private CloseTabCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class CopyCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "copy";
|
||||
public static CopyCommand Instance { get; } = new CopyCommand();
|
||||
public static CopyCommand Instance { get; } = new();
|
||||
|
||||
private CopyCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class CopyNativePathCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "copy_path";
|
||||
public static CopyNativePathCommand Instance { get; } = new CopyNativePathCommand();
|
||||
public static CopyNativePathCommand Instance { get; } = new();
|
||||
|
||||
private CopyNativePathCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class CreateContainer : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "create_container";
|
||||
public static CreateContainer Instance { get; } = new CreateContainer();
|
||||
public static CreateContainer Instance { get; } = new();
|
||||
|
||||
private CreateContainer()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class CreateElement : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "create_element";
|
||||
public static CreateElement Instance { get; } = new CreateElement();
|
||||
public static CreateElement Instance { get; } = new();
|
||||
|
||||
private CreateElement()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@ public class DeleteCommand : IIdentifiableUserCommand
|
||||
public const string SoftDeleteCommandName = "soft_delete";
|
||||
public const string HardDeleteCommandName = "hard_delete";
|
||||
|
||||
public static DeleteCommand SoftDelete { get; } = new DeleteCommand(SoftDeleteCommandName, false);
|
||||
public static DeleteCommand HardDelete { get; } = new DeleteCommand(HardDeleteCommandName, true);
|
||||
public static DeleteCommand SoftDelete { get; } = new(SoftDeleteCommandName, false);
|
||||
public static DeleteCommand HardDelete { get; } = new(HardDeleteCommandName, true);
|
||||
|
||||
private DeleteCommand(string commandName, bool hardDelete)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class EnterRapidTravelCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "exter_rapid_travel_mode";
|
||||
public static EnterRapidTravelCommand Instance { get; } = new EnterRapidTravelCommand();
|
||||
public static EnterRapidTravelCommand Instance { get; } = new();
|
||||
|
||||
private EnterRapidTravelCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class ExitRapidTravelCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "exit_rapid_travel_mode";
|
||||
public static ExitRapidTravelCommand Instance { get; } = new ExitRapidTravelCommand();
|
||||
public static ExitRapidTravelCommand Instance { get; } = new();
|
||||
|
||||
private ExitRapidTravelCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class GoToHomeCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "go_to_home";
|
||||
public static GoToHomeCommand Instance { get; } = new GoToHomeCommand();
|
||||
public static GoToHomeCommand Instance { get; } = new();
|
||||
|
||||
private GoToHomeCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class GoToPathCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "go_to_path";
|
||||
public static GoToPathCommand Instance { get; } = new GoToPathCommand();
|
||||
public static GoToPathCommand Instance { get; } = new();
|
||||
|
||||
private GoToPathCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class GoToProviderCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "go_to_provider";
|
||||
public static GoToProviderCommand Instance { get; } = new GoToProviderCommand();
|
||||
public static GoToProviderCommand Instance { get; } = new();
|
||||
|
||||
private GoToProviderCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class GoToRootCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "go_to_root";
|
||||
public static GoToRootCommand Instance { get; } = new GoToRootCommand();
|
||||
public static GoToRootCommand Instance { get; } = new();
|
||||
|
||||
private GoToRootCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class GoUpCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "go_up";
|
||||
public static GoUpCommand Instance { get; } = new GoUpCommand();
|
||||
public static GoUpCommand Instance { get; } = new();
|
||||
|
||||
private GoUpCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class MarkCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "mark_selected";
|
||||
public static MarkCommand Instance { get; } = new MarkCommand();
|
||||
public static MarkCommand Instance { get; } = new();
|
||||
|
||||
private MarkCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class MoveCursorDownCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "move_cursor_down";
|
||||
public static MoveCursorDownCommand Instance { get; } = new MoveCursorDownCommand();
|
||||
public static MoveCursorDownCommand Instance { get; } = new();
|
||||
|
||||
private MoveCursorDownCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class MoveCursorDownPageCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "move_cursor_down_page";
|
||||
public static MoveCursorDownPageCommand Instance { get; } = new MoveCursorDownPageCommand();
|
||||
public static MoveCursorDownPageCommand Instance { get; } = new();
|
||||
|
||||
private MoveCursorDownPageCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class MoveCursorToFirstCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "move_cursor_to_first";
|
||||
public static MoveCursorToFirstCommand Instance { get; } = new MoveCursorToFirstCommand();
|
||||
public static MoveCursorToFirstCommand Instance { get; } = new();
|
||||
|
||||
private MoveCursorToFirstCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class MoveCursorToLastCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "move_cursor_to_last";
|
||||
public static MoveCursorToLastCommand Instance { get; } = new MoveCursorToLastCommand();
|
||||
public static MoveCursorToLastCommand Instance { get; } = new();
|
||||
|
||||
private MoveCursorToLastCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class MoveCursorUpCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "move_cursor_up";
|
||||
public static MoveCursorUpCommand Instance { get; } = new MoveCursorUpCommand();
|
||||
public static MoveCursorUpCommand Instance { get; } = new();
|
||||
|
||||
private MoveCursorUpCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class MoveCursorUpPageCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "move_cursor_up_page";
|
||||
public static MoveCursorUpPageCommand Instance { get; } = new MoveCursorUpPageCommand();
|
||||
public static MoveCursorUpPageCommand Instance { get; } = new();
|
||||
|
||||
private MoveCursorUpPageCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public class OpenInDefaultFileExplorerCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "open_in_default_explorer";
|
||||
public static OpenInDefaultFileExplorerCommand Instance { get; } = new OpenInDefaultFileExplorerCommand();
|
||||
public static OpenInDefaultFileExplorerCommand Instance { get; } = new();
|
||||
|
||||
private OpenInDefaultFileExplorerCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class OpenSelectedCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "open_selected";
|
||||
public static OpenSelectedCommand Instance { get; } = new OpenSelectedCommand();
|
||||
public static OpenSelectedCommand Instance { get; } = new();
|
||||
|
||||
private OpenSelectedCommand()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace FileTime.App.Core.UserCommand;
|
||||
public sealed class RefreshCommand : IIdentifiableUserCommand
|
||||
{
|
||||
public const string CommandName = "refresh";
|
||||
public static RefreshCommand Instance { get; } = new RefreshCommand();
|
||||
public static RefreshCommand Instance { get; } = new();
|
||||
|
||||
private RefreshCommand()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user