Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 4 additions & 48 deletions System.CommandLine.sln
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Renderin
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Rendering.Tests", "src\System.CommandLine.Rendering.Tests\System.CommandLine.Rendering.Tests.csproj", "{9E574595-A9CD-441A-9328-1D4DD5B531E8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Benchmarks", "src\System.CommandLine.Benchmarks\System.CommandLine.Benchmarks.csproj", "{C39B0705-993E-43DB-B66A-A37A587F0BF7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Hosting", "src\System.CommandLine.Hosting\System.CommandLine.Hosting.csproj", "{644C4B4A-4A32-4307-9F71-C3BF901FFB66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Hosting.Tests", "src\System.CommandLine.Hosting.Tests\System.CommandLine.Hosting.Tests.csproj", "{39483140-BC26-4CAD-BBAE-3DC76C2F16CF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostingPlayground", "samples\HostingPlayground\HostingPlayground.csproj", "{0BF6958D-9EE3-4623-B3D6-4DA77EAC1906}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Generator", "src\System.CommandLine.Generator\System.CommandLine.Generator.csproj", "{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Generator.Tests", "src\System.CommandLine.Generator.Tests\System.CommandLine.Generator.Tests.csproj", "{70B98293-2F69-4262-AADD-D3EEE12046A8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.Generator.CommandHandler", "src\System.CommandLine.Generator.CommandHandler\System.CommandLine.Generator.CommandHandler.csproj", "{591EF370-7AD7-4624-8B9D-FD15010CA657}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.CommandLine.Generator.CommandHandler", "src\System.CommandLine.Generator.CommandHandler\System.CommandLine.Generator.CommandHandler.csproj", "{591EF370-7AD7-4624-8B9D-FD15010CA657}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.CommandLine.NamingConventionBinder", "src\System.CommandLine.NamingConventionBinder\System.CommandLine.NamingConventionBinder.csproj", "{10DFE204-B027-49DA-BD77-08ECA18DD357}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.NamingConventionBinder", "src\System.CommandLine.NamingConventionBinder\System.CommandLine.NamingConventionBinder.csproj", "{10DFE204-B027-49DA-BD77-08ECA18DD357}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.CommandLine.NamingConventionBinder.Tests", "src\System.CommandLine.NamingConventionBinder.Tests\System.CommandLine.NamingConventionBinder.Tests.csproj", "{789A05F2-5EF6-4FE8-9609-4706207E047E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.NamingConventionBinder.Tests", "src\System.CommandLine.NamingConventionBinder.Tests\System.CommandLine.NamingConventionBinder.Tests.csproj", "{789A05F2-5EF6-4FE8-9609-4706207E047E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.CommandLine.ApiCompatibility.Tests", "src\System.CommandLine.ApiCompatibility.Tests\System.CommandLine.ApiCompatibility.Tests.csproj", "{A54EE328-D456-4BAF-A180-84E77E6409AC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.CommandLine.ApiCompatibility.Tests", "src\System.CommandLine.ApiCompatibility.Tests\System.CommandLine.ApiCompatibility.Tests.csproj", "{A54EE328-D456-4BAF-A180-84E77E6409AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -199,18 +194,6 @@ Global
{9E574595-A9CD-441A-9328-1D4DD5B531E8}.Release|x64.Build.0 = Release|Any CPU
{9E574595-A9CD-441A-9328-1D4DD5B531E8}.Release|x86.ActiveCfg = Release|Any CPU
{9E574595-A9CD-441A-9328-1D4DD5B531E8}.Release|x86.Build.0 = Release|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Debug|x64.ActiveCfg = Debug|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Debug|x64.Build.0 = Debug|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Debug|x86.ActiveCfg = Debug|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Debug|x86.Build.0 = Debug|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Release|Any CPU.Build.0 = Release|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Release|x64.ActiveCfg = Release|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Release|x64.Build.0 = Release|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Release|x86.ActiveCfg = Release|Any CPU
{C39B0705-993E-43DB-B66A-A37A587F0BF7}.Release|x86.Build.0 = Release|Any CPU
{644C4B4A-4A32-4307-9F71-C3BF901FFB66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{644C4B4A-4A32-4307-9F71-C3BF901FFB66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{644C4B4A-4A32-4307-9F71-C3BF901FFB66}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -247,30 +230,6 @@ Global
{0BF6958D-9EE3-4623-B3D6-4DA77EAC1906}.Release|x64.Build.0 = Release|Any CPU
{0BF6958D-9EE3-4623-B3D6-4DA77EAC1906}.Release|x86.ActiveCfg = Release|Any CPU
{0BF6958D-9EE3-4623-B3D6-4DA77EAC1906}.Release|x86.Build.0 = Release|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Debug|x64.ActiveCfg = Debug|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Debug|x64.Build.0 = Debug|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Debug|x86.ActiveCfg = Debug|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Debug|x86.Build.0 = Debug|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Release|Any CPU.Build.0 = Release|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Release|x64.ActiveCfg = Release|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Release|x64.Build.0 = Release|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Release|x86.ActiveCfg = Release|Any CPU
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C}.Release|x86.Build.0 = Release|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Debug|x64.ActiveCfg = Debug|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Debug|x64.Build.0 = Debug|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Debug|x86.ActiveCfg = Debug|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Debug|x86.Build.0 = Debug|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Release|Any CPU.Build.0 = Release|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Release|x64.ActiveCfg = Release|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Release|x64.Build.0 = Release|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Release|x86.ActiveCfg = Release|Any CPU
{70B98293-2F69-4262-AADD-D3EEE12046A8}.Release|x86.Build.0 = Release|Any CPU
{591EF370-7AD7-4624-8B9D-FD15010CA657}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{591EF370-7AD7-4624-8B9D-FD15010CA657}.Debug|Any CPU.Build.0 = Debug|Any CPU
{591EF370-7AD7-4624-8B9D-FD15010CA657}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -334,12 +293,9 @@ Global
{8D9A8DCB-DC74-4B3A-B1C6-046C9C4F458E} = {6749FB3E-39DE-4321-A39E-525278E9408D}
{27E3BFFC-4412-4E4C-A656-B9D35B8A0F3E} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{9E574595-A9CD-441A-9328-1D4DD5B531E8} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{C39B0705-993E-43DB-B66A-A37A587F0BF7} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{644C4B4A-4A32-4307-9F71-C3BF901FFB66} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{39483140-BC26-4CAD-BBAE-3DC76C2F16CF} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{0BF6958D-9EE3-4623-B3D6-4DA77EAC1906} = {6749FB3E-39DE-4321-A39E-525278E9408D}
{B0D00128-E41B-4648-9D22-9B91F8F6BF0C} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{70B98293-2F69-4262-AADD-D3EEE12046A8} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{591EF370-7AD7-4624-8B9D-FD15010CA657} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{10DFE204-B027-49DA-BD77-08ECA18DD357} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
{789A05F2-5EF6-4FE8-9609-4706207E047E} = {E5B1EC71-0FC4-4FAA-9C65-32D5016FBC45}
Expand Down
10 changes: 10 additions & 0 deletions System.CommandLine.v3.ncrunchsolution
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<SolutionConfiguration>
<Settings>
<AllowParallelTestExecution>True</AllowParallelTestExecution>
<CustomBuildProperties>
<Value>TargetFrameworks = net7.0</Value>
<Value>TargetFramework = net7.0</Value>
</CustomBuildProperties>
<SolutionConfigured>True</SolutionConfigured>
</Settings>
</SolutionConfiguration>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ System.CommandLine.NamingConventionBinder
public static System.Void AddModelBinder(this System.CommandLine.Binding.BindingContext bindingContext, ModelBinder binder)
public static System.CommandLine.Binding.BindingContext GetBindingContext(this System.CommandLine.ParseResult parseResult)
public static ModelBinder GetOrCreateModelBinder(this System.CommandLine.Binding.BindingContext bindingContext, System.CommandLine.Binding.IValueDescriptor valueDescriptor)
public abstract class BindingHandler : System.CommandLine.CliAction
public abstract class BindingHandler : System.CommandLine.Invocation.AsynchronousCliAction
public System.CommandLine.Binding.BindingContext GetBindingContext(System.CommandLine.ParseResult parseResult)
public static class CommandHandler
public static BindingHandler Create(System.Delegate delegate)
Expand Down Expand Up @@ -119,7 +119,6 @@ System.CommandLine.NamingConventionBinder
public class ModelBindingCommandHandler : BindingHandler
public System.Void BindParameter(System.Reflection.ParameterInfo param, System.CommandLine.CliArgument argument)
public System.Void BindParameter(System.Reflection.ParameterInfo param, System.CommandLine.CliOption option)
public System.Int32 Invoke(System.CommandLine.ParseResult parseResult)
public System.Threading.Tasks.Task<System.Int32> InvokeAsync(System.CommandLine.ParseResult parseResult, System.Threading.CancellationToken cancellationToken = null)
public class ModelDescriptor
public static ModelDescriptor FromType<T>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ System.CommandLine
public static CliArgument<System.IO.DirectoryInfo> AcceptExistingOnly(this CliArgument<System.IO.DirectoryInfo> argument)
public static CliArgument<System.IO.FileSystemInfo> AcceptExistingOnly(this CliArgument<System.IO.FileSystemInfo> argument)
public static CliArgument<T> AcceptExistingOnly<T>(this CliArgument<T> argument)
public abstract class CliAction
public System.Boolean Exclusive { get; }
public System.Int32 Invoke(ParseResult parseResult)
public System.Threading.Tasks.Task<System.Int32> InvokeAsync(ParseResult parseResult, System.Threading.CancellationToken cancellationToken = null)
protected System.Void set_Exclusive(System.Boolean value)
public abstract class CliArgument : CliSymbol
public ArgumentArity Arity { get; set; }
public System.Collections.Generic.List<System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>>> CompletionSources { get; }
Expand All @@ -42,15 +37,17 @@ System.CommandLine
public System.Void AcceptOnlyFromAmong(System.String[] values)
public class CliCommand : CliSymbol, System.Collections.Generic.IEnumerable<CliSymbol>, System.Collections.IEnumerable
.ctor(System.String name, System.String description = null)
public CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
public System.Collections.Generic.ICollection<System.String> Aliases { get; }
public System.Collections.Generic.IList<CliArgument> Arguments { get; }
public System.Collections.Generic.IEnumerable<CliSymbol> Children { get; }
public System.Collections.Generic.IList<CliOption> Options { get; }
public System.Collections.Generic.IList<CliCommand> Subcommands { get; }
public System.Boolean TreatUnmatchedTokensAsErrors { get; set; }
public System.Collections.Generic.List<System.Action<System.CommandLine.Parsing.CommandResult>> Validators { get; }
public System.Void Add(CliSymbol symbol)
public System.Void Add(CliArgument argument)
public System.Void Add(CliOption option)
public System.Void Add(CliCommand command)
public System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem> GetCompletions(System.CommandLine.Completions.CompletionContext context)
public System.Collections.Generic.IEnumerator<CliSymbol> GetEnumerator()
public ParseResult Parse(System.Collections.Generic.IReadOnlyList<System.String> args, CliConfiguration configuration = null)
Expand All @@ -63,9 +60,7 @@ System.CommandLine
.ctor(CliCommand rootCommand)
public System.Collections.Generic.List<CliDirective> Directives { get; }
public System.Boolean EnableDefaultExceptionHandler { get; set; }
public System.Boolean EnableParseErrorReporting { get; set; }
public System.Boolean EnablePosixBundling { get; set; }
public System.Boolean EnableTypoCorrections { get; set; }
public System.IO.TextWriter Error { get; set; }
public System.IO.TextWriter Output { get; set; }
public System.Nullable<System.TimeSpan> ProcessTerminationTimeout { get; set; }
Expand All @@ -82,10 +77,10 @@ System.CommandLine
.ctor(System.String message)
public class CliDirective : CliSymbol
.ctor(System.String name)
public CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
public System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem> GetCompletions(System.CommandLine.Completions.CompletionContext context)
public abstract class CliOption : CliSymbol
public CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
public System.Collections.Generic.ICollection<System.String> Aliases { get; }
public System.Boolean AllowMultipleArgumentsPerToken { get; set; }
public ArgumentArity Arity { get; set; }
Expand Down Expand Up @@ -120,18 +115,18 @@ System.CommandLine
public static System.Void Add(this System.Collections.Generic.List<System.Func<System.CommandLine.Completions.CompletionContext,System.Collections.Generic.IEnumerable<System.CommandLine.Completions.CompletionItem>>> completionSources, System.String[] completions)
public class DiagramDirective : CliDirective
.ctor()
public CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
public System.Int32 ParseErrorReturnValue { get; set; }
public class EnvironmentVariablesDirective : CliDirective
.ctor()
public CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
public static class OptionValidation
public static CliOption<System.IO.FileInfo> AcceptExistingOnly(this CliOption<System.IO.FileInfo> option)
public static CliOption<System.IO.DirectoryInfo> AcceptExistingOnly(this CliOption<System.IO.DirectoryInfo> option)
public static CliOption<System.IO.FileSystemInfo> AcceptExistingOnly(this CliOption<System.IO.FileSystemInfo> option)
public static CliOption<T> AcceptExistingOnly<T>(this CliOption<T> option)
public class ParseResult
public CliAction Action { get; }
public System.CommandLine.Invocation.CliAction Action { get; }
public System.CommandLine.Parsing.CommandResult CommandResult { get; }
public CliConfiguration Configuration { get; }
public System.Collections.Generic.IReadOnlyList<System.CommandLine.Parsing.ParseError> Errors { get; }
Expand All @@ -154,7 +149,7 @@ System.CommandLine
public class VersionOption : CliOption<System.Boolean>
.ctor()
.ctor(System.String name, System.String[] aliases)
public CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
System.CommandLine.Completions
public class CompletionContext
public static CompletionContext Empty { get; }
Expand All @@ -174,17 +169,16 @@ System.CommandLine.Completions
public System.String ToString()
public class SuggestDirective : System.CommandLine.CliDirective
.ctor()
public System.CommandLine.CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
public class TextCompletionContext : CompletionContext
public System.String CommandLineText { get; }
public System.Int32 CursorPosition { get; }
public TextCompletionContext AtCursorPosition(System.Int32 position)
System.CommandLine.Help
public class HelpAction : System.CommandLine.CliAction
public class HelpAction : System.CommandLine.Invocation.SynchronousCliAction
.ctor()
public HelpBuilder Builder { get; set; }
public System.Int32 Invoke(System.CommandLine.ParseResult parseResult)
public System.Threading.Tasks.Task<System.Int32> InvokeAsync(System.CommandLine.ParseResult parseResult, System.Threading.CancellationToken cancellationToken = null)
public class HelpBuilder
.ctor(System.Int32 maxWidth = 2147483647)
public System.Int32 MaxWidth { get; }
Expand Down Expand Up @@ -217,14 +211,27 @@ System.CommandLine.Help
public class HelpOption : System.CommandLine.CliOption<System.Boolean>
.ctor()
.ctor(System.String name, System.String[] aliases)
public System.CommandLine.CliAction Action { get; set; }
public System.CommandLine.Invocation.CliAction Action { get; set; }
public class TwoColumnHelpRow, System.IEquatable<TwoColumnHelpRow>
.ctor(System.String firstColumnText, System.String secondColumnText)
public System.String FirstColumnText { get; }
public System.String SecondColumnText { get; }
public System.Boolean Equals(System.Object obj)
public System.Boolean Equals(TwoColumnHelpRow other)
public System.Int32 GetHashCode()
System.CommandLine.Invocation
public abstract class AsynchronousCliAction : CliAction
public System.Threading.Tasks.Task<System.Int32> InvokeAsync(System.CommandLine.ParseResult parseResult, System.Threading.CancellationToken cancellationToken = null)
public abstract class CliAction
public System.Boolean Terminating { get; }
protected System.Void set_Terminating(System.Boolean value)
public class ParseErrorAction : SynchronousCliAction
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking out loud here: should we keep all actions in the System.CommandLine.Invocation namespace?

For example to me ParseErrorAction belongs in System.CommandLine.Parsing as it's related to parsing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thought here was that since the entire invocation space is a effectively a different layer and could be replaced with a completely different invocation infrastructure on top of the same parser, none of these belong under parsing.

.ctor()
public System.Boolean ShowHelp { get; set; }
public System.Boolean ShowTypoCorrections { get; set; }
public System.Int32 Invoke(System.CommandLine.ParseResult parseResult)
public abstract class SynchronousCliAction : CliAction
public System.Int32 Invoke(System.CommandLine.ParseResult parseResult)
System.CommandLine.Parsing
public class ArgumentResult : SymbolResult
public System.CommandLine.CliArgument Argument { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections.Generic;
using System.CommandLine.Benchmarks.Helpers;
using System.CommandLine.Invocation;
using System.IO;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -60,7 +61,7 @@ public string ParseResult_Diagram(BdnParam<ParseResult> parseResult)
// clear the contents, so each benchmark has the same starting state
stringBuilder.Clear();

parseResult.Value.Action!.Invoke(parseResult.Value);
((SynchronousCliAction)parseResult.Value.Action)!.Invoke(parseResult.Value);

return stringBuilder.ToString();
}
Expand All @@ -74,7 +75,7 @@ public async Task<string> ParseResult_DiagramAsync(BdnParam<ParseResult> parseRe
// clear the contents, so each benchmark has the same starting state
stringBuilder.Clear();

await parseResult.Value.Action!.InvokeAsync(parseResult.Value);
await ((AsynchronousCliAction)parseResult.Value.Action!).InvokeAsync(parseResult.Value);

return stringBuilder.ToString();
}
Expand Down
Loading