From 4b23ab76ee04ca464e1317162049395ba99640b3 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Fri, 10 Apr 2026 10:31:42 +0200 Subject: [PATCH 1/2] Update Spectre.Console.Cli to v0.55.0 --- src/Refitter/Refitter.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Refitter/Refitter.csproj b/src/Refitter/Refitter.csproj index 560ce1cd2..b44b02029 100644 --- a/src/Refitter/Refitter.csproj +++ b/src/Refitter/Refitter.csproj @@ -21,7 +21,7 @@ - + From 08392e693e84a1b7d1338b3b56292e2825651cef Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Fri, 10 Apr 2026 10:31:55 +0200 Subject: [PATCH 2/2] Fix breaking changes from Spectre.Console.Cli update --- src/Refitter.Tests/GenerateCommandTests.cs | 16 ++++++++++------ src/Refitter/GenerateCommand.cs | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Refitter.Tests/GenerateCommandTests.cs b/src/Refitter.Tests/GenerateCommandTests.cs index 273244b3b..eaf039f86 100644 --- a/src/Refitter.Tests/GenerateCommandTests.cs +++ b/src/Refitter.Tests/GenerateCommandTests.cs @@ -125,22 +125,26 @@ public void CreateRefitGeneratorSettings_Should_Map_PropertyNamingPolicy() } [Test] - public void Command_Should_Have_Public_Validate_Method() + public void Command_Should_Have_Protected_Validate_Method() { var command = new GenerateCommand(); - var method = command.GetType().GetMethod("Validate"); + var method = command.GetType().GetMethod( + "Validate", + System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); method.Should().NotBeNull(); - method!.IsPublic.Should().BeTrue(); + method!.IsFamily.Should().BeTrue(); } [Test] - public void Command_Should_Have_Public_ExecuteAsync_Method() + public void Command_Should_Have_Protected_ExecuteAsync_Method() { var command = new GenerateCommand(); - var method = command.GetType().GetMethod("ExecuteAsync"); + var method = command.GetType().GetMethod( + "ExecuteAsync", + System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); method.Should().NotBeNull(); - method!.IsPublic.Should().BeTrue(); + method!.IsFamily.Should().BeTrue(); } } diff --git a/src/Refitter/GenerateCommand.cs b/src/Refitter/GenerateCommand.cs index 507f027f3..80ff55361 100644 --- a/src/Refitter/GenerateCommand.cs +++ b/src/Refitter/GenerateCommand.cs @@ -23,7 +23,7 @@ public sealed class GenerateCommand : AsyncCommand private static readonly string Crlf = Environment.NewLine; - public override ValidationResult Validate(CommandContext context, Settings settings) + protected override ValidationResult Validate(CommandContext context, Settings settings) { if (!settings.NoLogging) Analytics.Configure(); @@ -35,7 +35,7 @@ public override ValidationResult Validate(CommandContext context, Settings setti return SettingsValidator.Validate(settings); } - public override async Task ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken) + protected override async Task ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken) { var refitGeneratorSettings = CreateRefitGeneratorSettings(settings); try