Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions src/Wolfgang.TryPattern/TryActionResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@ public TryActionResult
}


/// Used when action succeeded
/// <summary>
/// Initializes a new instance of the TryActionResult class for a successful operation.
/// </summary>
public TryActionResult()
: this(true, null)
{
}



/// Used when action failed
/// <summary>
/// Initializes a new instance of the TryActionResult class for a failed operation.
/// </summary>
/// <param name="exception">The exception that caused the operation to fail.</param>
public TryActionResult
(
Exception exception
Expand Down
10 changes: 8 additions & 2 deletions src/Wolfgang.TryPattern/TryFuncResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public TryFuncResult



/// Used when function succeeded
/// <summary>
/// Initializes a new instance of the TryFuncResult class for a successful operation.
/// </summary>
/// <param name="value">The value produced by the successful operation.</param>
public TryFuncResult
(
#if NET5_0_OR_GREATER
Expand All @@ -52,7 +55,10 @@ T value



/// Used when function failed
/// <summary>
/// Initializes a new instance of the TryFuncResult class for a failed operation.
/// </summary>
/// <param name="exception">The exception that caused the operation to fail.</param>
public TryFuncResult
(
Exception? exception
Expand Down