Skip to content

Commit

Permalink
fixed missing default null for Reason
Browse files Browse the repository at this point in the history
  • Loading branch information
md-redwan-hossain committed Oct 4, 2024
1 parent c5c3182 commit ee02942
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/SharpOutcome/Helpers/HttpBadOutcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace SharpOutcome.Helpers;
/// </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>;
public readonly record struct HttpBadOutcome(HttpBadOutcomeTag Tag, string? Reason = null)
: IBadOutcome<HttpBadOutcomeTag>;

/// <summary>
/// Represents an HTTP bad outcome with a payload of type <typeparamref name="TPayload"/>.
Expand All @@ -17,5 +18,5 @@ namespace SharpOutcome.Helpers;
/// <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)
public readonly record struct HttpBadOutcome<TPayload>(HttpBadOutcomeTag Tag, TPayload Payload, string? Reason = null)
: IBadOutcomeWithPayload<HttpBadOutcomeTag, TPayload>;
4 changes: 2 additions & 2 deletions src/SharpOutcome/Helpers/HttpGoodOutcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace SharpOutcome.Helpers;
/// </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)
public readonly record struct HttpGoodOutcome(HttpGoodOutcomeTag Tag, string? Reason = null)
: IGoodOutcome<HttpGoodOutcomeTag>;

/// <summary>
Expand All @@ -18,5 +18,5 @@ public readonly record struct HttpGoodOutcome(HttpGoodOutcomeTag Tag, string? Re
/// <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)
public readonly record struct HttpGoodOutcome<TPayload>(HttpGoodOutcomeTag Tag, TPayload Payload, string? Reason = null)
: IGoodOutcomeWithPayload<HttpGoodOutcomeTag, TPayload>;
2 changes: 1 addition & 1 deletion src/SharpOutcome/SharpOutcome.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<Title>SharpOutcome</Title>
<Authors>Md. Redwan Hossain</Authors>
<Copyright>Copyright (c) Md. Redwan Hossain</Copyright>
Expand Down

0 comments on commit ee02942

Please sign in to comment.