diff --git a/src/Fluss.Regen/Generators/RegistrationSyntaxGenerator.cs b/src/Fluss.Regen/Generators/RegistrationSyntaxGenerator.cs index a9e7c3b..6d9b16b 100644 --- a/src/Fluss.Regen/Generators/RegistrationSyntaxGenerator.cs +++ b/src/Fluss.Regen/Generators/RegistrationSyntaxGenerator.cs @@ -41,7 +41,7 @@ public void WriteEndNamespace() public void WriteBeginClass() { - _writer.WriteIndentedLine("public static partial class {0}ServiceCollectionExtensions {{", _moduleName); + _writer.WriteIndentedLine("public static partial class {0}ComponentsServiceCollectionExtensions {{", _moduleName); _writer.IncreaseIndent(); } @@ -99,7 +99,7 @@ public void WriteComponentRegistration(string componentName) { _writer.WriteIndentedLine("Add{0}{1}(sc);", _moduleName, componentName); } - + public override string ToString() => _sb.ToString(); diff --git a/src/Fluss.Regen/SelectorGenerator.cs b/src/Fluss.Regen/SelectorGenerator.cs index 589b319..1977a7f 100644 --- a/src/Fluss.Regen/SelectorGenerator.cs +++ b/src/Fluss.Regen/SelectorGenerator.cs @@ -197,7 +197,7 @@ private static void WriteRegistration( generator.WriteHeader(); generator.WriteBeginNamespace(); generator.WriteBeginClass(); - + var foundInfo = false; var aggregateValidators = syntaxInfos.OfType().ToImmutableHashSet(); @@ -205,7 +205,7 @@ private static void WriteRegistration( if (aggregateValidators.Any() || eventValidators.Any()) { generator.WriteBeginRegistrationMethod("Validators"); - + foreach (var aggregateValidator in aggregateValidators) { generator.WriteAggregateValidatorRegistration(aggregateValidator.Type.ToFullyQualified()); @@ -214,11 +214,11 @@ private static void WriteRegistration( { generator.WriteEventValidatorRegistration(eventValidator.Type.ToFullyQualified()); } - + generator.WriteEndRegistrationMethod(); foundInfo = true; } - + var policies = syntaxInfos.OfType().ToImmutableHashSet(); if (policies.Any()) { @@ -230,7 +230,7 @@ private static void WriteRegistration( generator.WriteEndRegistrationMethod(); foundInfo = true; } - + var sideEffects = syntaxInfos.OfType().ToImmutableHashSet(); if (sideEffects.Any()) { @@ -242,7 +242,7 @@ private static void WriteRegistration( generator.WriteEndRegistrationMethod(); foundInfo = true; } - + var upcasters = syntaxInfos.OfType().ToImmutableHashSet(); if (upcasters.Any()) { @@ -254,7 +254,7 @@ private static void WriteRegistration( generator.WriteEndRegistrationMethod(); foundInfo = true; } - + generator.WriteBeginRegistrationMethod("Components"); if (aggregateValidators.Any() || eventValidators.Any()) { diff --git a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForEventValidator.DotNet8_0#Registration.g.verified.cs b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForEventValidator.DotNet8_0#Registration.g.verified.cs index 1156c40..7711697 100644 --- a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForEventValidator.DotNet8_0#Registration.g.verified.cs +++ b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForEventValidator.DotNet8_0#Registration.g.verified.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; namespace Microsoft.Extensions.DependencyInjection { - public static partial class SelectorGeneratorTestsESServiceCollectionExtensions { + public static partial class SelectorGeneratorTestsESComponentsServiceCollectionExtensions { public static global::Microsoft.Extensions.DependencyInjection.IServiceCollection AddSelectorGeneratorTestsESValidators(this global::Microsoft.Extensions.DependencyInjection.IServiceCollection sc) { global::Fluss.Validation.ValidationServiceCollectionExtension.AddEventValidator(sc); return sc; diff --git a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForPolicy.DotNet8_0#Registration.g.verified.cs b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForPolicy.DotNet8_0#Registration.g.verified.cs index 2df774e..63c2cfd 100644 --- a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForPolicy.DotNet8_0#Registration.g.verified.cs +++ b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForPolicy.DotNet8_0#Registration.g.verified.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; namespace Microsoft.Extensions.DependencyInjection { - public static partial class SelectorGeneratorTestsESServiceCollectionExtensions { + public static partial class SelectorGeneratorTestsESComponentsServiceCollectionExtensions { public static global::Microsoft.Extensions.DependencyInjection.IServiceCollection AddSelectorGeneratorTestsESPolicies(this global::Microsoft.Extensions.DependencyInjection.IServiceCollection sc) { global::Fluss.Authentication.ServiceCollectionExtensions.AddPolicy(sc); return sc; diff --git a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForSideEffect.DotNet8_0#Registration.g.verified.cs b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForSideEffect.DotNet8_0#Registration.g.verified.cs index 183e298..1fd4130 100644 --- a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForSideEffect.DotNet8_0#Registration.g.verified.cs +++ b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForSideEffect.DotNet8_0#Registration.g.verified.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; namespace Microsoft.Extensions.DependencyInjection { - public static partial class SelectorGeneratorTestsESServiceCollectionExtensions { + public static partial class SelectorGeneratorTestsESComponentsServiceCollectionExtensions { public static global::Microsoft.Extensions.DependencyInjection.IServiceCollection AddSelectorGeneratorTestsESSideEffects(this global::Microsoft.Extensions.DependencyInjection.IServiceCollection sc) { global::Fluss.SideEffects.SideEffectsServiceCollectionExtension.AddSideEffect(sc); return sc; diff --git a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForUpcaster.DotNet8_0#Registration.g.verified.cs b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForUpcaster.DotNet8_0#Registration.g.verified.cs index 16418fd..74dc444 100644 --- a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForUpcaster.DotNet8_0#Registration.g.verified.cs +++ b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GenerateForUpcaster.DotNet8_0#Registration.g.verified.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; namespace Microsoft.Extensions.DependencyInjection { - public static partial class SelectorGeneratorTestsESServiceCollectionExtensions { + public static partial class SelectorGeneratorTestsESComponentsServiceCollectionExtensions { public static global::Microsoft.Extensions.DependencyInjection.IServiceCollection AddSelectorGeneratorTestsESUpcasters(this global::Microsoft.Extensions.DependencyInjection.IServiceCollection sc) { global::Fluss.ServiceCollectionExtensions.AddUpcaster(sc); return sc; diff --git a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GeneratesForAggregateValidator.DotNet8_0#Registration.g.verified.cs b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GeneratesForAggregateValidator.DotNet8_0#Registration.g.verified.cs index 0d65617..605fb76 100644 --- a/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GeneratesForAggregateValidator.DotNet8_0#Registration.g.verified.cs +++ b/src/Fluss.UnitTest/Regen/Snapshots/SelectorGeneratorTests.GeneratesForAggregateValidator.DotNet8_0#Registration.g.verified.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; namespace Microsoft.Extensions.DependencyInjection { - public static partial class SelectorGeneratorTestsESServiceCollectionExtensions { + public static partial class SelectorGeneratorTestsESComponentsServiceCollectionExtensions { public static global::Microsoft.Extensions.DependencyInjection.IServiceCollection AddSelectorGeneratorTestsESValidators(this global::Microsoft.Extensions.DependencyInjection.IServiceCollection sc) { global::Fluss.Validation.ValidationServiceCollectionExtension.AddAggregateValidator(sc); return sc;