From 718fd530261218ad336bfbd35d7cd1d9b2e0bca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81d=C3=A1m=20Kov=C3=A1cs?= Date: Tue, 4 Jul 2023 19:18:15 +0200 Subject: [PATCH] Use target typed new in commands --- .../UserCommand/CloseTabCommand.cs | 2 +- .../FileTime.App.Core.Abstraction/UserCommand/CopyCommand.cs | 2 +- .../UserCommand/CopyNativePathCommand.cs | 2 +- .../UserCommand/CreateContainer.cs | 2 +- .../UserCommand/CreateElement.cs | 2 +- .../UserCommand/DeleteCommand.cs | 4 ++-- .../UserCommand/EnterRapidTravelCommand.cs | 2 +- .../UserCommand/ExitRapidTravelCommand.cs | 2 +- .../UserCommand/GoToHomeCommand.cs | 2 +- .../UserCommand/GoToPathCommand.cs | 2 +- .../UserCommand/GoToProviderCommand.cs | 2 +- .../UserCommand/GoToRootCommand.cs | 2 +- .../FileTime.App.Core.Abstraction/UserCommand/GoUpCommand.cs | 2 +- .../FileTime.App.Core.Abstraction/UserCommand/MarkCommand.cs | 2 +- .../UserCommand/MoveCursorDownCommand.cs | 2 +- .../UserCommand/MoveCursorDownPageCommand.cs | 2 +- .../UserCommand/MoveCursorToFirstCommand.cs | 2 +- .../UserCommand/MoveCursorToLastCommand.cs | 2 +- .../UserCommand/MoveCursorUpCommand.cs | 2 +- .../UserCommand/MoveCursorUpPageCommand.cs | 2 +- .../UserCommand/OpenInDefaultFileExplorerCommand.cs | 2 +- .../UserCommand/OpenSelectedCommand.cs | 2 +- .../UserCommand/RefreshCommand.cs | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CloseTabCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CloseTabCommand.cs index 7c7e68b..bd66306 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CloseTabCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CloseTabCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyCommand.cs index 3559432..069a69c 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyNativePathCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyNativePathCommand.cs index a73cdaf..b04c54d 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyNativePathCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CopyNativePathCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateContainer.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateContainer.cs index 1ae448c..00927b0 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateContainer.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateContainer.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateElement.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateElement.cs index 11f5254..ea93908 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateElement.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/CreateElement.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/DeleteCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/DeleteCommand.cs index 8568a70..cd85e39 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/DeleteCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/DeleteCommand.cs @@ -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) { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/EnterRapidTravelCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/EnterRapidTravelCommand.cs index 6d4a41b..594d6de 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/EnterRapidTravelCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/EnterRapidTravelCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/ExitRapidTravelCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/ExitRapidTravelCommand.cs index 69f4287..f352ec6 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/ExitRapidTravelCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/ExitRapidTravelCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToHomeCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToHomeCommand.cs index 6d5433a..7e095a3 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToHomeCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToHomeCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToPathCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToPathCommand.cs index 4980f7b..4015a27 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToPathCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToPathCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToProviderCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToProviderCommand.cs index a73c5e6..e1bc6b3 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToProviderCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToProviderCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToRootCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToRootCommand.cs index 46b6840..4bee60f 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToRootCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoToRootCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoUpCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoUpCommand.cs index 017fec6..e73a32c 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoUpCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/GoUpCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MarkCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MarkCommand.cs index ea6993d..250f2cc 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MarkCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MarkCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownCommand.cs index fdfbb1a..656040b 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownPageCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownPageCommand.cs index 47f5a32..25d7d73 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownPageCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorDownPageCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToFirstCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToFirstCommand.cs index 34c9d42..a0a7bf7 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToFirstCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToFirstCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToLastCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToLastCommand.cs index 97f60d5..58b3e4e 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToLastCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorToLastCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpCommand.cs index ac934db..f47df46 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpPageCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpPageCommand.cs index eaa7a3a..4e9f221 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpPageCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/MoveCursorUpPageCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenInDefaultFileExplorerCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenInDefaultFileExplorerCommand.cs index 606cbbf..713947d 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenInDefaultFileExplorerCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenInDefaultFileExplorerCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenSelectedCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenSelectedCommand.cs index 5ed3eb9..eb6a211 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenSelectedCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/OpenSelectedCommand.cs @@ -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() { diff --git a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/RefreshCommand.cs b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/RefreshCommand.cs index f9851e9..ace54a1 100644 --- a/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/RefreshCommand.cs +++ b/src/AppCommon/FileTime.App.Core.Abstraction/UserCommand/RefreshCommand.cs @@ -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() {