@@ -6,19 +6,39 @@ namespace DotNetCampus.Cli;
66public readonly record struct CommandLineParsingOptions
77{
88 /// <inheritdoc cref="CommandLineStyle.Flexible" />
9- public static CommandLineParsingOptions Flexible => new ( ) { Style = CommandLineStyle . Flexible } ;
9+ public static CommandLineParsingOptions Flexible => new ( )
10+ {
11+ Style = CommandLineStyle . Flexible ,
12+ UnknownArgumentsHandling = UnknownCommandArgumentHandling . IgnoreUnknownOptionalArguments ,
13+ } ;
1014
1115 /// <inheritdoc cref="CommandLineStyle.DotNet" />
12- public static CommandLineParsingOptions DotNet => new ( ) { Style = CommandLineStyle . DotNet } ;
16+ public static CommandLineParsingOptions DotNet => new ( )
17+ {
18+ Style = CommandLineStyle . DotNet ,
19+ UnknownArgumentsHandling = UnknownCommandArgumentHandling . IgnoreUnknownOptionalArguments ,
20+ } ;
1321
1422 /// <inheritdoc cref="CommandLineStyle.Gnu" />
15- public static CommandLineParsingOptions Gnu => new ( ) { Style = CommandLineStyle . Gnu } ;
23+ public static CommandLineParsingOptions Gnu => new ( )
24+ {
25+ Style = CommandLineStyle . Gnu ,
26+ UnknownArgumentsHandling = UnknownCommandArgumentHandling . IgnoreUnknownOptionalArguments ,
27+ } ;
1628
1729 /// <inheritdoc cref="CommandLineStyle.Posix" />
18- public static CommandLineParsingOptions Posix => new ( ) { Style = CommandLineStyle . Posix } ;
30+ public static CommandLineParsingOptions Posix => new ( )
31+ {
32+ Style = CommandLineStyle . Posix ,
33+ UnknownArgumentsHandling = UnknownCommandArgumentHandling . IgnoreUnknownOptionalArguments ,
34+ } ;
1935
2036 /// <inheritdoc cref="CommandLineStyle.Windows" />
21- public static CommandLineParsingOptions Windows => new ( ) { Style = CommandLineStyle . Windows } ;
37+ public static CommandLineParsingOptions Windows => new ( )
38+ {
39+ Style = CommandLineStyle . Windows ,
40+ UnknownArgumentsHandling = UnknownCommandArgumentHandling . IgnoreUnknownOptionalArguments ,
41+ } ;
2242
2343 /// <inheritdoc cref="CommandLineStyle.Windows" />
2444 [ Obsolete ( "为避免理解歧义,已弃用此名称,请使用 Windows 代替。" ) ]
0 commit comments