-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added HttpGoodOutcome and HttpBadOutcome
- Loading branch information
1 parent
51644e3
commit 36e4772
Showing
7 changed files
with
45 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace SharpOutcome.Helpers; | ||
|
||
/// <summary> | ||
/// Represents an HTTP bad outcome. | ||
/// </summary> | ||
/// <param name="Tag">The unique tag of the bad outcome.</param> | ||
/// <param name="Reason">The reason for the bad outcome (optional).</param> | ||
public readonly record struct HttpBadOutcome(HttpBadOutcomeTag Tag, string? Reason) : IBadOutcome<HttpBadOutcomeTag>; | ||
|
||
/// <summary> | ||
/// Represents an HTTP bad outcome with a payload of type <typeparamref name="TPayload"/>. | ||
/// </summary> | ||
/// <param name="Tag">The unique tag of the bad outcome.</param> | ||
/// <typeparam name="TPayload">The type of the payload.</typeparam> | ||
/// <param name="Payload">The payload that carries contextual data.</param> | ||
/// <param name="Reason">The reason for the bad outcome (optional).</param> | ||
public readonly record struct HttpBadOutcome<TPayload>(HttpBadOutcomeTag Tag, TPayload Payload, string? Reason) | ||
: IBadOutcomeWithPayload<HttpBadOutcomeTag, TPayload>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace SharpOutcome.Helpers; | ||
|
||
/// <summary> | ||
/// Represents an HTTP good outcome. | ||
/// </summary> | ||
/// <param name="Tag">The unique tag of the good outcome.</param> | ||
/// <param name="Reason">The reason for the good outcome (optional).</param> | ||
public readonly record struct HttpGoodOutcome(HttpGoodOutcomeTag Tag, string? Reason) | ||
: IGoodOutcome<HttpGoodOutcomeTag>; | ||
|
||
/// <summary> | ||
/// Represents an HTTP good outcome with a payload of type <typeparamref name="TPayload"/>. | ||
/// </summary> | ||
/// <param name="Tag">The unique tag of the good outcome.</param> | ||
/// <typeparam name="TPayload">The type of the payload.</typeparam> | ||
/// <param name="Payload">The payload that carries contextual data.</param> | ||
/// <param name="Reason">The reason for the good outcome (optional).</param> | ||
public readonly record struct HttpGoodOutcome<TPayload>(HttpGoodOutcomeTag Tag, TPayload Payload, string? Reason) | ||
: IGoodOutcomeWithPayload<HttpGoodOutcomeTag, TPayload>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters