diff --git a/Directory.Build.props b/Directory.Build.props index e6a5dce..6b73807 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,7 +9,7 @@ true DDDToolkit-Icon.png - 2.0.2.16 + 2.0.2.17 README.md diff --git a/Examples/DDDToolkit.NugetApi/DDDToolkit.NugetApi.csproj b/Examples/DDDToolkit.NugetApi/DDDToolkit.NugetApi.csproj index 896af33..02fc9eb 100644 --- a/Examples/DDDToolkit.NugetApi/DDDToolkit.NugetApi.csproj +++ b/Examples/DDDToolkit.NugetApi/DDDToolkit.NugetApi.csproj @@ -12,11 +12,11 @@ - + - + - + all diff --git a/Source/DDDToolkit.Analyzers/Generators/ValueObjectGenerator.cs b/Source/DDDToolkit.Analyzers/Generators/ValueObjectGenerator.cs index 37ee62c..923c1ee 100644 --- a/Source/DDDToolkit.Analyzers/Generators/ValueObjectGenerator.cs +++ b/Source/DDDToolkit.Analyzers/Generators/ValueObjectGenerator.cs @@ -49,10 +49,8 @@ private static void CreateValueObject(SourceProductionContext context, (ResultTy return; } - var valueObjectInfo = new ValueObjectInfo(recordDeclaration, options); - foreach (var property in valueObjectInfo.ConverterConstructorProperties) { if (!property.HasInitSetter()) @@ -65,8 +63,6 @@ private static void CreateValueObject(SourceProductionContext context, (ResultTy } } - - var sourceCode = $$$""" // using DDDToolkit.BaseTypes; @@ -81,6 +77,7 @@ namespace {{{valueObjectInfo.Namespace}}}; partial record {{{valueObjectInfo.Name}}} : ValueObject { + [Internal] public override IEnumerable GetEqualityComponents() { {{{string.Join("\n", valueObjectInfo.EqualityComponents)}}} @@ -159,7 +156,6 @@ public override int GetHashCode() """; } - internal class ValueObjectInfo(RecordDeclarationSyntax recordDeclaration, DDDOptions options) { public RecordDeclarationSyntax RecordDeclaration { get; } = recordDeclaration;