Skip to content

Commit 2eb7bfa

Browse files
committed
fixup: cleanup obsolete messages for throwOnUnexpectedArg
1 parent 37da4ee commit 2eb7bfa

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/CommandLineUtils/Attributes/CommandAttribute.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public string? Name
101101
/// </summary>
102102
/// <seealso cref="CommandLineApplication.ThrowOnUnexpectedArgument"/>
103103
[Obsolete("This property is obsolete and will be removed in a future version. " +
104-
"The recommended replacement is UnrecognizedArgumentHandling.")]
104+
"The recommended replacement is UnrecognizedArgumentHandling. " +
105+
"See https://github.com/natemcmaster/CommandLineUtils/issues/339 for details.")]
105106
[EditorBrowsable(EditorBrowsableState.Never)]
106107
public bool ThrowOnUnexpectedArgument
107108
{

src/CommandLineUtils/CommandLineApplication.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public CommandLineApplication(IHelpTextGenerator helpTextGenerator, IConsole con
107107
/// </summary>
108108
/// <param name="throwOnUnexpectedArg">Initial value for <see cref="ThrowOnUnexpectedArgument"/>.</param>
109109
[Obsolete("This constructor is obsolete and will be removed in a future version. " +
110-
"The recommended replacement is the parameterless constructor CommandLineApplication() and the property UnrecognizedArgumentHandling." +
110+
"The recommended replacement is the parameterless constructor CommandLineApplication() and the property UnrecognizedArgumentHandling. " +
111111
"See https://github.com/natemcmaster/CommandLineUtils/issues/339 for details.")]
112112
[EditorBrowsable(EditorBrowsableState.Never)]
113113
public CommandLineApplication(bool throwOnUnexpectedArg)
@@ -131,7 +131,7 @@ public CommandLineApplication(bool throwOnUnexpectedArg)
131131
/// <param name="workingDirectory">The current working directory.</param>
132132
/// <param name="throwOnUnexpectedArg">Initial value for <see cref="ThrowOnUnexpectedArgument"/>.</param>
133133
[Obsolete("This constructor is obsolete and will be removed in a future version. " +
134-
"The recommended replacement is the constructor CommandLineApplication(IConsole, string) and the property UnrecognizedArgumentHandling." +
134+
"The recommended replacement is the constructor CommandLineApplication(IConsole, string) and the property UnrecognizedArgumentHandling. " +
135135
"See https://github.com/natemcmaster/CommandLineUtils/issues/339 for details.")]
136136
[EditorBrowsable(EditorBrowsableState.Never)]
137137
public CommandLineApplication(IConsole console, string workingDirectory, bool throwOnUnexpectedArg)
@@ -155,7 +155,7 @@ public CommandLineApplication(IConsole console, string workingDirectory, bool th
155155
/// <param name="workingDirectory">The current working directory.</param>
156156
/// <param name="throwOnUnexpectedArg">Initial value for <see cref="ThrowOnUnexpectedArgument"/>.</param>
157157
[Obsolete("This constructor is obsolete and will be removed in a future version. " +
158-
"The recommended replacement is the constructor CommandLineApplication(IHelpTextGenerator, IConsole, string) and the property UnrecognizedArgumentHandling." +
158+
"The recommended replacement is the constructor CommandLineApplication(IHelpTextGenerator, IConsole, string) and the property UnrecognizedArgumentHandling. " +
159159
"See https://github.com/natemcmaster/CommandLineUtils/issues/339 for details.")]
160160
[EditorBrowsable(EditorBrowsableState.Never)]
161161
public CommandLineApplication(IHelpTextGenerator helpTextGenerator, IConsole console, string workingDirectory, bool throwOnUnexpectedArg)
@@ -331,7 +331,8 @@ public CommandOption? OptionHelp
331331
/// </para>
332332
/// </summary>
333333
[Obsolete("This property is obsolete and will be removed in a future version. " +
334-
"The recommended replacement is UnrecognizedArgumentHandling.")]
334+
"The recommended replacement is UnrecognizedArgumentHandling. " +
335+
"See https://github.com/natemcmaster/CommandLineUtils/issues/339 for details.")]
335336
[EditorBrowsable(EditorBrowsableState.Never)]
336337
public bool ThrowOnUnexpectedArgument
337338
{
@@ -614,7 +615,8 @@ public CommandLineApplication Command(string name, Action<CommandLineApplication
614615
/// <param name="throwOnUnexpectedArg"></param>
615616
/// <returns></returns>
616617
[Obsolete("This constructor is obsolete and will be removed in a future version. " +
617-
"The recommended replacement is Command(string, Action<CommandLineApplication>) and the property UnrecognizedArgumentHandling")]
618+
"The recommended replacement is Command(string, Action<CommandLineApplication>) and the property UnrecognizedArgumentHandling. " +
619+
"See https://github.com/natemcmaster/CommandLineUtils/issues/339 for details.")]
618620
[EditorBrowsable(EditorBrowsableState.Never)]
619621
public CommandLineApplication Command(string name, Action<CommandLineApplication> configuration, bool throwOnUnexpectedArg)
620622
{
@@ -663,7 +665,8 @@ public CommandLineApplication<TModel> Command<TModel>(string name, Action<Comman
663665
/// <typeparam name="TModel">The model type of the subcommand.</typeparam>
664666
/// <returns></returns>
665667
[Obsolete("This constructor is obsolete and will be removed in a future version. " +
666-
"The recommended replacement is Command(string, Action<CommandLineApplication>) and the property UnrecognizedArgumentHandling")]
668+
"The recommended replacement is Command(string, Action<CommandLineApplication>) and the property UnrecognizedArgumentHandling. " +
669+
"See https://github.com/natemcmaster/CommandLineUtils/issues/339 for details.")]
667670
[EditorBrowsable(EditorBrowsableState.Never)]
668671
public CommandLineApplication<TModel> Command<TModel>(string name, Action<CommandLineApplication<TModel>> configuration,
669672
bool throwOnUnexpectedArg)

0 commit comments

Comments
 (0)