diff --git a/.editorconfig b/.editorconfig
index 1fe3674..c4bec38 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -104,7 +104,15 @@ dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, meth
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
-dotnet_naming_symbols.types.required_modifiers =
+dotnet_naming_symbols.types.required_modifiers =
+
+dotnet_naming_rule.non_public_constants_must_be_pascal_case.symbols = non_public_constants
+dotnet_naming_rule.non_public_constants_must_be_pascal_case.style = pascal_case
+dotnet_naming_rule.non_public_constants_must_be_pascal_case.severity = suggestion
+
+dotnet_naming_symbols.non_public_constants.applicable_kinds = field
+dotnet_naming_symbols.non_public_constants.required_modifiers = const
+dotnet_naming_symbols.non_public_constants.applicable_accessibilities = internal, private, protected, protected_internal
; lang style
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
diff --git a/Directory.Build.props b/Directory.Build.props
index 8feb496..7a37fdb 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -9,7 +9,8 @@
-
+
+ 9.*
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Ellosoft.AwsCredentialsManager/Ellosoft.AwsCredentialsManager.csproj b/src/Ellosoft.AwsCredentialsManager/Ellosoft.AwsCredentialsManager.csproj
index 83e8bec..502c361 100644
--- a/src/Ellosoft.AwsCredentialsManager/Ellosoft.AwsCredentialsManager.csproj
+++ b/src/Ellosoft.AwsCredentialsManager/Ellosoft.AwsCredentialsManager.csproj
@@ -44,10 +44,11 @@
-
-
-
-
+
+
+
+
+
@@ -56,7 +57,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/src/Ellosoft.AwsCredentialsManager/Infrastructure/Cli/TypeRegistrar.cs b/src/Ellosoft.AwsCredentialsManager/Infrastructure/Cli/TypeRegistrar.cs
index 1c8d16c..b121871 100644
--- a/src/Ellosoft.AwsCredentialsManager/Infrastructure/Cli/TypeRegistrar.cs
+++ b/src/Ellosoft.AwsCredentialsManager/Infrastructure/Cli/TypeRegistrar.cs
@@ -4,43 +4,33 @@
namespace Ellosoft.AwsCredentialsManager.Infrastructure.Cli;
-public class TypeRegistrar : ITypeRegistrar
+public class TypeRegistrar(IServiceCollection services) : ITypeRegistrar
{
- private readonly IServiceCollection _builder;
+ public ITypeResolver Build() => new TypeResolver(services.BuildServiceProvider());
- public TypeRegistrar(IServiceCollection builder) => _builder = builder;
+ public void Register(Type service, Type implementation) => services.AddSingleton(service, new TypeWithPublicConstructors(implementation).Type);
- public ITypeResolver Build() => new TypeResolver(_builder.BuildServiceProvider());
-
- public void Register(Type service, Type implementation) => _builder.AddSingleton(service, new TypeWithPublicConstructors(implementation).Type);
-
- public void RegisterInstance(Type service, object implementation) => _builder.AddSingleton(service, implementation);
+ public void RegisterInstance(Type service, object implementation) => services.AddSingleton(service, implementation);
public void RegisterLazy(Type service, Func