We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b86c1b9 commit b0835c1Copy full SHA for b0835c1
Helpers/ResultSystem/TryGet.cs
@@ -6,9 +6,10 @@ namespace SER.Helpers.ResultSystem;
6
7
public sealed class TryGet<TValue>(TValue? value, string? errorMsg)
8
{
9
- [Pure] public TValue? Value => value;
10
- [Pure] public string? ErrorMsg => errorMsg;
+ public TValue? Value => value;
+ public string? ErrorMsg => errorMsg;
11
private bool WasSuccess => string.IsNullOrEmpty(errorMsg);
12
+ public Result Result => new(WasSuccess, ErrorMsg ?? "");
13
14
[Pure]
15
public bool HasErrored(out string error)
0 commit comments