Skip to content

Commit a56c94e

Browse files
committed
Updated dependencies and replaced FluentAssertions with Shouldly.
1 parent 716d678 commit a56c94e

21 files changed

+243
-544
lines changed

src/LightResults.Extensions.GeneratedIdentifier/GeneratedIdentifierSourceGenerator.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,6 @@ namespace {symbolNamespace};
178178
"""
179179
);
180180

181-
if (isStruct)
182-
source.AppendLine("""
183-
/// <summary>Gets whether this identifier is the default value.</summary>
184-
public bool IsDefault => _value == default;
185-
186-
"""
187-
);
188-
189181
source.AppendLine($"""
190182
{declaredValueType} IValueObject<{declaredValueType}, {symbolName}>.Value => _value;
191183

src/LightResults.Extensions.GeneratedIdentifier/LightResults.Extensions.GeneratedIdentifier.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</PackageReference>
2828
<PackageReference Include="Microsoft.Bcl.HashCode" Version="6.0.0" PrivateAssets="all" GeneratePathProperty="true"/>
2929
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all"/>
30-
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.4.0.108396">
30+
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.7.0.110445">
3131
<PrivateAssets>all</PrivateAssets>
3232
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3333
</PackageReference>

src/LightResults.Extensions.ValueObjects/TypeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static bool IsValueObjectType([DynamicallyAccessedMembers(DynamicallyAcce
1616
}
1717
if (valueObjectInterface is null)
1818
{
19-
valueObjectType = default!;
19+
valueObjectType = null!;
2020
return false;
2121
}
2222

tests/LightResults.Extensions.GeneratedIdentifier.Tests/GeneratedIdentifierSourceGeneratorTests.GenerateGuidIdentifier_WithNamespace.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ public readonly partial struct TestGuidId :
2828
IComparable<TestGuidId>,
2929
IComparable
3030
{
31-
/// <summary>Gets whether this identifier is the default value.</summary>
32-
public bool IsDefault => _value == default;
33-
3431
Guid IValueObject<Guid, TestGuidId>.Value => _value;
3532

3633
private readonly Guid _value;

tests/LightResults.Extensions.GeneratedIdentifier.Tests/GeneratedIdentifierSourceGeneratorTests.GenerateGuidIdentifier_WithoutNamespace.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public readonly partial struct TestGuidId :
2626
IComparable<TestGuidId>,
2727
IComparable
2828
{
29-
/// <summary>Gets whether this identifier is the default value.</summary>
30-
public bool IsDefault => _value == default;
31-
3229
Guid IValueObject<Guid, TestGuidId>.Value => _value;
3330

3431
private readonly Guid _value;

tests/LightResults.Extensions.GeneratedIdentifier.Tests/GeneratedIdentifierSourceGeneratorTests.GenerateIntIdentifier_WithNamespace.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ public readonly partial struct TestIntId :
2828
IComparable<TestIntId>,
2929
IComparable
3030
{
31-
/// <summary>Gets whether this identifier is the default value.</summary>
32-
public bool IsDefault => _value == default;
33-
3431
int IValueObject<int, TestIntId>.Value => _value;
3532

3633
private readonly int _value;

tests/LightResults.Extensions.GeneratedIdentifier.Tests/GeneratedIdentifierSourceGeneratorTests.GenerateIntIdentifier_WithoutNamespace.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public readonly partial struct TestIntId :
2626
IComparable<TestIntId>,
2727
IComparable
2828
{
29-
/// <summary>Gets whether this identifier is the default value.</summary>
30-
public bool IsDefault => _value == default;
31-
3229
int IValueObject<int, TestIntId>.Value => _value;
3330

3431
private readonly int _value;

tests/LightResults.Extensions.GeneratedIdentifier.Tests/GeneratedIdentifierSourceGeneratorTests.GenerateLongIdentifier_WithNamespace.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ public readonly partial struct TestLongId :
2828
IComparable<TestLongId>,
2929
IComparable
3030
{
31-
/// <summary>Gets whether this identifier is the default value.</summary>
32-
public bool IsDefault => _value == default;
33-
3431
long IValueObject<long, TestLongId>.Value => _value;
3532

3633
private readonly long _value;

tests/LightResults.Extensions.GeneratedIdentifier.Tests/GeneratedIdentifierSourceGeneratorTests.GenerateLongIdentifier_WithoutNamespace.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ public readonly partial struct TestLongId :
2626
IComparable<TestLongId>,
2727
IComparable
2828
{
29-
/// <summary>Gets whether this identifier is the default value.</summary>
30-
public bool IsDefault => _value == default;
31-
3229
long IValueObject<long, TestLongId>.Value => _value;
3330

3431
private readonly long _value;

tests/LightResults.Extensions.GeneratedIdentifier.Tests/GeneratedIdentifierSourceGeneratorTests.GenerateShortIdentifier_WithNamespace.verified.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ public readonly partial struct TestShortId :
2828
IComparable<TestShortId>,
2929
IComparable
3030
{
31-
/// <summary>Gets whether this identifier is the default value.</summary>
32-
public bool IsDefault => _value == default;
33-
3431
short IValueObject<short, TestShortId>.Value => _value;
3532

3633
private readonly short _value;

0 commit comments

Comments
 (0)