Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Common/ResultPattern/Result.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace Common.ResultPattern;

Expand All @@ -22,13 +23,15 @@ protected Result()
/// <param name="error">The error associated with the failed result.</param>
protected Result(Error error)
{
ArgumentNullException.ThrowIfNull(error);
IsSuccess = false;
Error = error;
}

/// <summary>
/// Gets a value indicating whether the result is successful.
/// </summary>
[MemberNotNullWhen(false, nameof(Error))]
public bool IsSuccess { get; }

/// <summary>
Expand Down