From 7c15c14f40d583213bc1300d5d454b952f07ae21 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Wed, 22 Feb 2023 13:41:07 -0600 Subject: [PATCH] refactor: More concise usage of UsedImplicitly in SyncCommand --- src/Recyclarr.Cli/Console/Commands/SyncCommand.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Recyclarr.Cli/Console/Commands/SyncCommand.cs b/src/Recyclarr.Cli/Console/Commands/SyncCommand.cs index 8ec7984d..c27750b2 100644 --- a/src/Recyclarr.Cli/Console/Commands/SyncCommand.cs +++ b/src/Recyclarr.Cli/Console/Commands/SyncCommand.cs @@ -27,25 +27,21 @@ public class SyncCommand : AsyncCommand { [CommandArgument(0, "[service]")] [EnumDescription("The service to sync. If not specified, all services are synced.")] - [UsedImplicitly(ImplicitUseKindFlags.Assign)] - public SupportedServices? Service { get; init; } + public SupportedServices? Service { get; [UsedImplicitly] init; } [CommandOption("-c|--config")] [Description("One or more YAML configuration files to load & use.")] [TypeConverter(typeof(FileInfoConverter))] - [UsedImplicitly(ImplicitUseKindFlags.Assign)] - public IFileInfo[] ConfigsOption { get; init; } = Array.Empty(); + public IFileInfo[] ConfigsOption { get; [UsedImplicitly] init; } = Array.Empty(); public IReadOnlyCollection Configs => ConfigsOption; [CommandOption("-p|--preview")] [Description("Perform a dry run: preview the results without syncing.")] - [UsedImplicitly(ImplicitUseKindFlags.Assign)] - public bool Preview { get; init; } + public bool Preview { get; [UsedImplicitly] init; } [CommandOption("-i|--instance")] [Description("One or more instance names to sync. If not specified, all instances will be synced.")] - [UsedImplicitly(ImplicitUseKindFlags.Assign)] - public string[] InstancesOption { get; init; } = Array.Empty(); + public string[] InstancesOption { get; [UsedImplicitly] init; } = Array.Empty(); public IReadOnlyCollection Instances => InstancesOption; }