Skip to content

Commit fdbbca9

Browse files
committed
Complex value objects check NRTs for null
1 parent 07ae114 commit fdbbca9

File tree

65 files changed

+276
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+276
-121
lines changed

samples/Thinktecture.Runtime.Extensions.Benchmarking/Database/Description.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Description cannot be empty.");
1615
return;
1716
}

samples/Thinktecture.Runtime.Extensions.Benchmarking/Database/DescriptionStruct.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Description cannot be empty.");
1615
return;
1716
}

samples/Thinktecture.Runtime.Extensions.Benchmarking/Database/Name.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Name cannot be empty.");
1615
return;
1716
}

samples/Thinktecture.Runtime.Extensions.Benchmarking/Database/NameStruct.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Name cannot be empty.");
1615
return;
1716
}

samples/Thinktecture.Runtime.Extensions.MessagePack.Samples/ProductNameWithMessagePackFormatter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Product name cannot be empty.");
1615
return;
1716
}

samples/Thinktecture.Runtime.Extensions.Samples/Unions/Jurisdiction.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1616
if (string.IsNullOrWhiteSpace(isoCode))
1717
{
1818
validationError = new ValidationError("ISO code is required.");
19-
isoCode = string.Empty;
2019
return;
2120
}
2221

samples/Thinktecture.Runtime.Extensions.Samples/ValueObjects/FileUrn.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@ static partial void ValidateFactoryArguments(
2222
if (string.IsNullOrWhiteSpace(fileStore))
2323
{
2424
validationError = new ValidationError("FileStore cannot be empty");
25-
fileStore = string.Empty;
26-
urn = string.Empty;
2725
return;
2826
}
2927

3028
if (string.IsNullOrWhiteSpace(urn))
3129
{
3230
validationError = new ValidationError("Urn cannot be empty");
33-
fileStore = string.Empty;
34-
urn = string.Empty;
3531
return;
3632
}
3733

samples/Thinktecture.Runtime.Extensions.Samples/ValueObjects/OtherProductName.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Product name cannot be empty.");
1615
return;
1716
}

samples/Thinktecture.Runtime.Extensions.Samples/ValueObjects/ProductName.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Product name cannot be empty.");
1615
return;
1716
}

samples/Thinktecture.Runtime.Extensions.Samples/ValueObjects/ProductNameStruct.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ static partial void ValidateFactoryArguments(ref ValidationError? validationErro
1111
{
1212
if (String.IsNullOrWhiteSpace(value))
1313
{
14-
value = null!;
1514
validationError = new ValidationError("Product name cannot be empty.");
1615
return;
1716
}

0 commit comments

Comments
 (0)