-
I have the following: internal class Settings : ServiceCommandSettings
{
[CommandArgument(0, "[service]")]
[Description("One of either sonarr or radarr. If not specified, defaults to all services.")]
public SupportedServices? Service { get; [UsedImplicitly] init; }
[CommandOption("-c|--configs")]
[Description("One or more YAML configuration files to load & use")]
[TypeConverter(typeof(FileInfoConverter))]
public IFileInfo[] Configs { get; [UsedImplicitly] init; } = Array.Empty<IFileInfo>();
} The goal is to specify my command like so:
However, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You can not use space as a separator for multiple values in this way. Either (If you choose a new separator instead of space, you'd probably need to change your converter accordingly.) |
Beta Was this translation helpful? Give feedback.
-
Would't |
Beta Was this translation helpful? Give feedback.
You can not use space as a separator for multiple values in this way.
Either
--configs="file1 file2"
or--configs file1,file2
should work.(If you choose a new separator instead of space, you'd probably need to change your converter accordingly.)