Skip to content

Commit

Permalink
Issue-104: Update XML docs with missing parameters
Browse files Browse the repository at this point in the history
closes #104
SemVer:None
  • Loading branch information
doomchild committed Nov 26, 2024
1 parent 420a208 commit 9d0d229
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/TaskExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private static Exception HandleCancellation<T>(this Task<T> task)
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TR">The type of the other input value to <paramref name="morphismTask"/>.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="morphismTask">A <see cref="Task{Func{T, TR, TNext}}"/> containing the transformation function. </param>
/// <returns>The transformed task.</returns>
public static Task<TNext> Ap<T, TNext>(
Expand Down
3 changes: 3 additions & 0 deletions src/TaskExtensionsIfFaulted.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static partial class TaskExtensions
/// Performs an action if the <see name="Task{T}"/> is in a faulted state.
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFaulted">The action to perform if the task is faulted.</param>
/// <returns>The task.</returns>
public static Task<T> IfFaulted<T>(this Task<T> task, Action<Exception> onFaulted)
Expand All @@ -27,6 +28,7 @@ public static Task<T> IfFaulted<T>(this Task<T> task, Action<Exception> onFaulte
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="R">The output task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
public static Task<T> IfFaulted<T, R>(this Task<T> task, Func<Exception, Task<R>> onFaulted)
Expand Down Expand Up @@ -64,6 +66,7 @@ public static Task<T> IfFaulted<T, R>(this Task<T> task, Func<Exception, Task<R>
/// Executes a function and throws away the result if the <see name="Task{T}"/> is in a faulted state.
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
public static Task<T> IfFaulted<T>(this Task<T> task, Func<Exception, Task> onFaulted)
Expand Down
1 change: 1 addition & 0 deletions src/TaskExtensionsIfFulfilled.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static partial class TaskExtensions
/// Performs an action if the <see name="Task{T}"/> is in a fulfilled state.
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="consumer">The action to perform if the task is fulfilled.</param>
/// <returns>The task.</returns>
public static Task<T> IfFulfilled<T>(this Task<T> task, Action<T> consumer)
Expand Down
14 changes: 11 additions & 3 deletions src/TaskExtensionsTap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static partial class TaskExtensions
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The function to execute if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand All @@ -26,7 +27,8 @@ public static Task<T> Tap<T>(this Task<T> task, Action<T> onFulfilled, Action<Ex
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="R">The output type of the <paramref name="onFaulted" /> function.
/// <typeparam name="R">The output type of the <paramref name="onFaulted" /> function.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The function to execute if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand All @@ -39,6 +41,7 @@ public static Task<T> Tap<T, R>(this Task<T> task, Action<T> onFulfilled, Func<E
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The function to execute if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand All @@ -51,7 +54,8 @@ public static Task<T> Tap<T>(this Task<T> task, Action<T> onFulfilled, Func<Exce
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="R">The output type of the <paramref name="onFaulted" /> function.
/// <typeparam name="R">The output type of the <paramref name="onFaulted" /> function.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The action to perform if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand All @@ -64,6 +68,7 @@ public static Task<T> Tap<T, R>(this Task<T> task, Func<T, Task<R>> onFulfilled,
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The function to execute if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand All @@ -76,7 +81,8 @@ public static Task<T> Tap<T>(this Task<T> task, Func<T, Task> onFulfilled, Actio
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="R">The output type of the <paramref name="onFaulted" /> function.
/// <typeparam name="R">The output type of the <paramref name="onFaulted" /> function.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The function to execute if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand All @@ -89,6 +95,7 @@ public static Task<T> Tap<T, R, S>(this Task<T> task, Func<T, Task<R>> onFulfill
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The function to execute if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand All @@ -101,6 +108,7 @@ public static Task<T> Tap<T>(this Task<T> task, Func<T, Task> onFulfilled, Func<
/// <remarks>This method is useful if you need to perform a side effect without altering the <see name"Task{T}"/>'s
/// value, such as logging.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The function to execute if the task is fulfilled.</param>
/// <param name="onFaulted">The function to execute if the task is faulted.</param>
/// <returns>The task.</returns>
Expand Down
15 changes: 14 additions & 1 deletion src/TaskExtensionsThen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static partial class TaskExtensions
/// <remarks>This method is an alias to <code>Task.ResultMap</code>.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function.</param>
/// <returns>The transformed task.</returns>
public static Task<TNext> Then<T, TNext>(this Task<T> task, Func<T, TNext> onFulfilled)
Expand All @@ -25,6 +26,7 @@ public static Task<TNext> Then<T, TNext>(this Task<T> task, Func<T, TNext> onFul
/// <remarks>This method is an alias to <code>Task.Bind</code>.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function.</param>
/// <returns>The transformed task.</returns>
public static Task<TNext> Then<T, TNext>(this Task<T> task, Func<T, Task<TNext>> onFulfilled)
Expand All @@ -36,6 +38,7 @@ public static Task<TNext> Then<T, TNext>(this Task<T> task, Func<T, Task<TNext>>
/// <remarks>This method is an alias to <code>Task.BiBind</code>.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <returns>The transformed task.</returns>
Expand All @@ -54,6 +57,7 @@ Func<Exception, TNext> onFaulted
/// <remarks>This method is an alias to <code>Task.BiBind</code>.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <returns>The transformed task.</returns>
Expand All @@ -69,6 +73,7 @@ Func<Exception, Task<TNext>> onFaulted
/// <remarks>This method is an alias to <code>Task.BiBind</code>.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <returns>The transformed task.</returns>
Expand All @@ -84,6 +89,7 @@ Func<Exception, TNext> onFaulted
/// <remarks>This method is an alias to <code>Task.BiBind</code>.</remarks>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <returns>The transformed task.</returns>
Expand All @@ -96,7 +102,8 @@ Func<Exception, Task<TNext>> onFaulted
/// <summary>
/// Transforms the value in a fulfilled <see name="Task{T}"/> to another type.
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparams>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="task">The task.</param>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="onFulfilled">The transformation function.</param>
/// <param name="cancellationToken">A cancellation token</param>
Expand Down Expand Up @@ -125,6 +132,7 @@ public static Task<TNext> Then<T, TNext>(
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <param name="cancellationToken">A cancellation token.</param>
Expand Down Expand Up @@ -154,6 +162,7 @@ public static Task<TNext> Then<T, TNext>(
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <param name="cancellationToken">A cancellation token.</param>
Expand Down Expand Up @@ -183,6 +192,7 @@ public static Task<TNext> Then<T, TNext>(
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <param name="cancellationToken">A cancellation token.</param>
Expand Down Expand Up @@ -212,6 +222,7 @@ public static Task<TNext> Then<T, TNext>(
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <param name="cancellationToken">A cancellation token.</param>
Expand Down Expand Up @@ -241,6 +252,7 @@ public static Task<TNext> Then<T, TNext>(
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <param name="cancellationToken">A cancellation token.</param>
Expand Down Expand Up @@ -270,6 +282,7 @@ public static Task<TNext> Then<T, TNext>(
/// </summary>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <typeparam name="TNext">The transformed type.</typeparam>
/// <param name="task">The task.</param>
/// <param name="onFulfilled">The transformation function for a fulfilled task.</param>
/// <param name="onFaulted">The transformation function for a faulted task.</param>
/// <param name="cancellationToken">A cancellation token.</param>
Expand Down
4 changes: 2 additions & 2 deletions src/TaskExtras.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Func<Exception, T> fulfillmentMorphism
: Task.FromException<T>(value);

/// <summary>
/// Produces a fulfilled <see cref="Task{T}"/> using the output of the <paramref name="fulfillmentMorphism"/> if the
/// Produces a fulfilled <see cref="Task{T}"/> using the output of the <paramref name="resolutionSupplier"/> if the
/// <paramref name="predicate"/> returns <code>true</code>.
/// </summary>
/// <example>This is a handy way to return to a non-faulted state. You might do something like the following:
Expand All @@ -121,7 +121,7 @@ Func<Exception, T> fulfillmentMorphism
/// </example>
/// <typeparam name="T">The task's underlying type.</typeparam>
/// <param name="predicate">A predicate to evaluate with the <see cref="Task{T}"/>'s <see cref="Exception"/>.</param>
/// <param name="fulfillmentMorphism">A function that takes an <see cref="Exception"/> and returns a
/// <param name="resolutionSupplier">A function that takes an <see cref="Exception"/> and returns a
/// <typeparamref name="T"/>.</param>
/// <returns>A function that performs fulfillment.</returns>
public static Func<Exception, Task<T>> ResolveIf<T>(
Expand Down

0 comments on commit 9d0d229

Please sign in to comment.