Skip to content

Commit

Permalink
fix: make VersionOptionFromAssemblyAttributes an extension method, as…
Browse files Browse the repository at this point in the history
… originally intended

Fixes #297
  • Loading branch information
natemcmaster committed Feb 11, 2020
1 parent e07893a commit ea347af
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CommandLineUtils/CommandLineApplicationExtensions.cs
Expand Up @@ -168,7 +168,7 @@ public static CommandOption VersionOptionFromAssemblyAttributes(this CommandLine
/// <param name="template"></param>
/// <param name="assembly"></param>
/// <exception cref="ArgumentNullException">Either <paramref name="app"/> or <paramref name="assembly"/> is <c>null</c>.</exception>
public static CommandOption VersionOptionFromAssemblyAttributes(CommandLineApplication app, string template, Assembly assembly)
public static CommandOption VersionOptionFromAssemblyAttributes(this CommandLineApplication app, string template, Assembly assembly)
=> app.VersionOption(template, GetInformationalVersion(assembly));

private static string? GetInformationalVersion(Assembly assembly)
Expand Down
1 change: 0 additions & 1 deletion src/CommandLineUtils/PublicAPI.Shipped.txt
Expand Up @@ -486,7 +486,6 @@ static McMaster.Extensions.CommandLineUtils.CommandLineApplicationExtensions.Opt
static McMaster.Extensions.CommandLineUtils.CommandLineApplicationExtensions.Option<T>(this McMaster.Extensions.CommandLineUtils.CommandLineApplication app, string template, string description, McMaster.Extensions.CommandLineUtils.CommandOptionType optionType) -> McMaster.Extensions.CommandLineUtils.CommandOption<T>
static McMaster.Extensions.CommandLineUtils.CommandLineApplicationExtensions.VerboseOption(this McMaster.Extensions.CommandLineUtils.CommandLineApplication app, string template) -> McMaster.Extensions.CommandLineUtils.CommandOption
static McMaster.Extensions.CommandLineUtils.CommandLineApplicationExtensions.VerboseOption(this McMaster.Extensions.CommandLineUtils.CommandLineApplication app) -> McMaster.Extensions.CommandLineUtils.CommandOption
static McMaster.Extensions.CommandLineUtils.CommandLineApplicationExtensions.VersionOptionFromAssemblyAttributes(McMaster.Extensions.CommandLineUtils.CommandLineApplication app, string template, System.Reflection.Assembly assembly) -> McMaster.Extensions.CommandLineUtils.CommandOption
static McMaster.Extensions.CommandLineUtils.CommandLineApplicationExtensions.VersionOptionFromAssemblyAttributes(this McMaster.Extensions.CommandLineUtils.CommandLineApplication app, System.Reflection.Assembly assembly) -> McMaster.Extensions.CommandLineUtils.CommandOption
static McMaster.Extensions.CommandLineUtils.ConsoleExtensions.Write(this McMaster.Extensions.CommandLineUtils.IConsole console, bool value) -> McMaster.Extensions.CommandLineUtils.IConsole
static McMaster.Extensions.CommandLineUtils.ConsoleExtensions.Write(this McMaster.Extensions.CommandLineUtils.IConsole console, char value) -> McMaster.Extensions.CommandLineUtils.IConsole
Expand Down
1 change: 1 addition & 0 deletions src/CommandLineUtils/PublicAPI.Unshipped.txt
Expand Up @@ -13,3 +13,4 @@ McMaster.Extensions.CommandLineUtils.CommandLineApplication.Command<TModel>(stri
McMaster.Extensions.CommandLineUtils.UnrecognizedArgumentHandling
McMaster.Extensions.CommandLineUtils.UnrecognizedArgumentHandling.StopParsingAndCollect = 1 -> McMaster.Extensions.CommandLineUtils.UnrecognizedArgumentHandling
McMaster.Extensions.CommandLineUtils.UnrecognizedArgumentHandling.Throw = 0 -> McMaster.Extensions.CommandLineUtils.UnrecognizedArgumentHandling
static McMaster.Extensions.CommandLineUtils.CommandLineApplicationExtensions.VersionOptionFromAssemblyAttributes(this McMaster.Extensions.CommandLineUtils.CommandLineApplication app, string template, System.Reflection.Assembly assembly) -> McMaster.Extensions.CommandLineUtils.CommandOption

0 comments on commit ea347af

Please sign in to comment.