Skip to content

Commit 3731a8e

Browse files
committed
set Init-Only Properties on Result
1 parent 0879446 commit 3731a8e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

JixMinApi/Shared/Result.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
public class Result<T>
55
{
6-
public bool IsSuccess { get; set; }
7-
public T? Value { get; set; }
6+
public bool IsSuccess { get; init; }
7+
public T? Value { get; init; }
88

9-
public bool IsError { get; set; }
10-
public Exception? Exception { get; set; }
9+
public bool IsError { get; init; }
10+
public Exception? Exception { get; init; }
1111

12-
public bool HasValidationError { get; set; }
13-
public List<KeyValuePair<string, string>> ValidationErrors { get; set; } = new List<KeyValuePair<string, string>>();
12+
public bool HasValidationError { get; init; }
13+
public List<KeyValuePair<string, string>> ValidationErrors { get; init; } = new List<KeyValuePair<string, string>>();
1414

1515

1616
public Result(T value)

0 commit comments

Comments
 (0)