You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/AsyncAwaitBestPractices/SafeFireAndForgetExtensions.extensions.shared.cs
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,14 @@ public static partial class SafeFireAndForgetExtensions
16
16
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
21
+
/// </summary>
22
+
/// <param name="task">ValueTask.</param>
23
+
/// <param name="onException">If an exception is thrown in the ValueTask, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
24
+
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
25
+
/// <typeparam name="T">The return value of the ValueTask.</typeparam>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
@@ -26,6 +34,15 @@ public static partial class SafeFireAndForgetExtensions
26
34
/// <typeparam name="TException">Exception type. If an exception is thrown of a different type, it will not be handled</typeparam>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
39
+
/// </summary>
40
+
/// <param name="task">ValueTask.</param>
41
+
/// <param name="onException">If an exception is thrown in the Task, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
42
+
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
43
+
/// <typeparam name="T">The return value of the ValueTask.</typeparam>
44
+
/// <typeparam name="TException">Exception type. If an exception is thrown of a different type, it will not be handled</typeparam>
/// Safely execute the Task without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
Copy file name to clipboardExpand all lines: src/AsyncAwaitBestPractices/SafeFireAndForgetExtensions.shared.cs
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,14 @@ public static partial class SafeFireAndForgetExtensions
19
19
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
24
+
/// </summary>
25
+
/// <param name="task">ValueTask.</param>
26
+
/// <param name="onException">If an exception is thrown in the ValueTask, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
27
+
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
28
+
/// <typeparam name="T">The return value of the ValueTask.</typeparam>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
@@ -29,6 +37,16 @@ public static partial class SafeFireAndForgetExtensions
29
37
/// <typeparam name="TException">Exception type. If an exception is thrown of a different type, it will not be handled</typeparam>
/// Safely execute the ValueTask without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
42
+
/// </summary>
43
+
/// <param name="task">ValueTask.</param>
44
+
/// <param name="onException">If an exception is thrown in the Task, <c>onException</c> will execute. If onException is null, the exception will be re-thrown</param>
45
+
/// <param name="continueOnCapturedContext">If set to <c>true</c>, continue on captured context; this will ensure that the Synchronization Context returns to the calling thread. If set to <c>false</c>, continue on a different context; this will allow the Synchronization Context to continue on a different thread</param>
46
+
/// <typeparam name="T">The return value of the ValueTask.</typeparam>
47
+
/// <typeparam name="TException">Exception type. If an exception is thrown of a different type, it will not be handled</typeparam>
/// Safely execute the Task without waiting for it to complete before moving to the next line of code; commonly known as "Fire And Forget". Inspired by John Thiriet's blog post, "Removing Async Void": https://johnthiriet.com/removing-async-void/.
0 commit comments