diff --git a/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/ComplexValueObjectCodeGenerator.cs b/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/ComplexValueObjectCodeGenerator.cs index f1f32b62..3d92709f 100644 --- a/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/ComplexValueObjectCodeGenerator.cs +++ b/src/Thinktecture.Runtime.Extensions.SourceGenerator/CodeAnalysis/ValueObjects/ComplexValueObjectCodeGenerator.cs @@ -85,6 +85,9 @@ private void GenerateValueObject(CancellationToken cancellationToken) { _sb.Append(@" + /// + /// Default instance of ").AppendTypeForXmlComment(_state).Append(@". + /// public static readonly ").AppendTypeFullyQualified(_state).Append(" ").Append(_state.Settings.DefaultInstancePropertyName).Append(" = default;"); } diff --git a/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.Should_generate_complex_struct_with_custom_default_instance_property_name.verified.txt b/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.Should_generate_complex_struct_with_custom_default_instance_property_name.verified.txt index 097eb1ea..677e6de4 100644 --- a/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.Should_generate_complex_struct_with_custom_default_instance_property_name.verified.txt +++ b/test/Thinktecture.Runtime.Extensions.SourceGenerator.Tests/SourceGeneratorTests/ValueObjectSourceGeneratorTests.Should_generate_complex_struct_with_custom_default_instance_property_name.verified.txt @@ -25,6 +25,9 @@ namespace Thinktecture.Tests private static readonly int _typeHashCode = typeof(global::Thinktecture.Tests.TestValueObject).GetHashCode(); + /// + /// Default instance of . + /// public static readonly global::Thinktecture.Tests.TestValueObject Null = default; ///