From fb05cbc261b3efb64ef53825db834aae679278ae Mon Sep 17 00:00:00 2001 From: alexmg Date: Thu, 12 Sep 2024 22:00:58 +1000 Subject: [PATCH] style: File scoped namespaces and usings satements --- src/Moniker.Cli/Program.cs | 71 ++++---- src/Moniker/MonikerStyle.cs | 25 ++- src/Moniker/NameGenerator.cs | 205 +++++++++++------------ src/Moniker/Utf8Strings.cs | 7 +- test/Moniker.Tests/CharsTests.cs | 4 +- test/Moniker.Tests/NameGeneratorTests.cs | 137 ++++++++------- test/Moniker.Tests/StringDataTests.cs | 4 +- 7 files changed, 222 insertions(+), 231 deletions(-) diff --git a/src/Moniker.Cli/Program.cs b/src/Moniker.Cli/Program.cs index 90fea1a..3a77818 100644 --- a/src/Moniker.Cli/Program.cs +++ b/src/Moniker.Cli/Program.cs @@ -1,43 +1,42 @@ using JetBrains.Annotations; using McMaster.Extensions.CommandLineUtils; -namespace Moniker.Cli +namespace Moniker.Cli; + +[Command(Name = "moniker", FullName = "moniker", Description = "Moniker command line interface")] +[VersionOptionFromMember(MemberName = nameof(GetVersion))] +internal class Program { - [Command(Name = "moniker", FullName = "moniker", Description = "Moniker command line interface")] - [VersionOptionFromMember(MemberName = nameof(GetVersion))] - internal class Program + private readonly IConsole _console; + + public Program(IConsole console) => _console = console; + + [Option("-s|--style