Skip to content

Commit cde03d6

Browse files
committed
defaults
1 parent adefaef commit cde03d6

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<RepositoryUrl>https://github.com/managedcode/Communication</RepositoryUrl>
1818
<PackageProjectUrl>https://github.com/managedcode/Communication</PackageProjectUrl>
1919
<Product>Managed Code - Communication</Product>
20-
<Version>2.0.22</Version>
21-
<PackageVersion>2.0.22</PackageVersion>
20+
<Version>2.0.23</Version>
21+
<PackageVersion>2.0.23</PackageVersion>
2222

2323
</PropertyGroup>
2424
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

ManagedCode.Communication/CollectionResultT/CollectionResult.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ public void ThrowIfFail()
5959
public bool IsSuccess { get; set; }
6060

6161
[MemberNotNullWhen(true, nameof(IsSuccess))]
62-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
62+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
6363
public T[]? Collection { get; set; }
6464

6565
public int PageNumber { get; set; }
6666
public int PageSize { get; set; }
6767
public int TotalItems { get; set; }
6868
public int TotalPages { get; set; }
6969

70-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
70+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
7171
public Error[]? Errors { get; set; }
7272

7373
[JsonIgnore]
@@ -96,7 +96,7 @@ public bool IsNotErrorCode(Enum value)
9696
return GetError()?.IsNotErrorCode(value) ?? false;
9797
}
9898

99-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
99+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
100100
public Dictionary<string, string>? InvalidObject { get; set; }
101101

102102
[JsonIgnore]

ManagedCode.Communication/Result/Result.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ public bool IsNotErrorCode(Enum value)
7272
return Errors[0];
7373
}
7474

75-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
75+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
7676
public Error[]? Errors { get; set; }
7777

7878

79-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
79+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
8080
public Dictionary<string, string>? InvalidObject { get; set; }
8181

8282
[JsonIgnore]

ManagedCode.Communication/ResultT/Result.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void ThrowIfFail()
5353
public bool IsFailed => !IsSuccess;
5454

5555
[MemberNotNullWhen(true, nameof(IsSuccess))]
56-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
56+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
5757
public T? Value { get; set; }
5858

5959
public Error? GetError()
@@ -64,10 +64,10 @@ public void ThrowIfFail()
6464
return Errors[0];
6565
}
6666

67-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
67+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
6868
public Error[]? Errors { get; set; }
6969

70-
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
70+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
7171
public Dictionary<string, string>? InvalidObject { get; set; }
7272

7373
[JsonIgnore]

0 commit comments

Comments
 (0)