Nito.AsyncEx.Tasks.xml 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. <?xml version="1.0"?>
  2. <doc>
  3. <assembly>
  4. <name>Nito.AsyncEx.Tasks</name>
  5. </assembly>
  6. <members>
  7. <member name="T:Nito.AsyncEx.AwaitableDisposable`1">
  8. <summary>
  9. An awaitable wrapper around a task whose result is disposable. The wrapper is not disposable, so this prevents usage errors like "using (MyAsync())" when the appropriate usage should be "using (await MyAsync())".
  10. </summary>
  11. <typeparam name="T">The type of the result of the underlying task.</typeparam>
  12. </member>
  13. <member name="F:Nito.AsyncEx.AwaitableDisposable`1._task">
  14. <summary>
  15. The underlying task.
  16. </summary>
  17. </member>
  18. <member name="M:Nito.AsyncEx.AwaitableDisposable`1.#ctor(System.Threading.Tasks.Task{`0})">
  19. <summary>
  20. Initializes a new awaitable wrapper around the specified task.
  21. </summary>
  22. <param name="task">The underlying task to wrap. This may not be <c>null</c>.</param>
  23. </member>
  24. <member name="M:Nito.AsyncEx.AwaitableDisposable`1.AsTask">
  25. <summary>
  26. Returns the underlying task.
  27. </summary>
  28. </member>
  29. <member name="M:Nito.AsyncEx.AwaitableDisposable`1.op_Implicit(Nito.AsyncEx.AwaitableDisposable{`0})~System.Threading.Tasks.Task{`0}">
  30. <summary>
  31. Implicit conversion to the underlying task.
  32. </summary>
  33. <param name="source">The awaitable wrapper.</param>
  34. </member>
  35. <member name="M:Nito.AsyncEx.AwaitableDisposable`1.GetAwaiter">
  36. <summary>
  37. Infrastructure. Returns the task awaiter for the underlying task.
  38. </summary>
  39. </member>
  40. <member name="M:Nito.AsyncEx.AwaitableDisposable`1.ConfigureAwait(System.Boolean)">
  41. <summary>
  42. Infrastructure. Returns a configured task awaiter for the underlying task.
  43. </summary>
  44. <param name="continueOnCapturedContext">Whether to attempt to marshal the continuation back to the captured context.</param>
  45. </member>
  46. <member name="T:Nito.AsyncEx.CancellationTokenTaskSource`1">
  47. <summary>
  48. Holds the task for a cancellation token, as well as the token registration. The registration is disposed when this instance is disposed.
  49. </summary>
  50. </member>
  51. <member name="F:Nito.AsyncEx.CancellationTokenTaskSource`1._registration">
  52. <summary>
  53. The cancellation token registration, if any. This is <c>null</c> if the registration was not necessary.
  54. </summary>
  55. </member>
  56. <member name="M:Nito.AsyncEx.CancellationTokenTaskSource`1.#ctor(System.Threading.CancellationToken)">
  57. <summary>
  58. Creates a task for the specified cancellation token, registering with the token if necessary.
  59. </summary>
  60. <param name="cancellationToken">The cancellation token to observe.</param>
  61. </member>
  62. <member name="P:Nito.AsyncEx.CancellationTokenTaskSource`1.Task">
  63. <summary>
  64. Gets the task for the source cancellation token.
  65. </summary>
  66. </member>
  67. <member name="M:Nito.AsyncEx.CancellationTokenTaskSource`1.Dispose">
  68. <summary>
  69. Disposes the cancellation token registration, if any. Note that this may cause <see cref="P:Nito.AsyncEx.CancellationTokenTaskSource`1.Task"/> to never complete.
  70. </summary>
  71. </member>
  72. <member name="T:Nito.AsyncEx.Interop.ApmAsyncFactory">
  73. <summary>
  74. Creation methods for tasks wrapping the Asynchronous Programming Model (APM), and APM wrapper methods around tasks.
  75. </summary>
  76. </member>
  77. <member name="M:Nito.AsyncEx.Interop.ApmAsyncFactory.ToBegin(System.Threading.Tasks.Task,System.AsyncCallback,System.Object)">
  78. <summary>
  79. Wraps a <see cref="T:System.Threading.Tasks.Task"/> into the Begin method of an APM pattern.
  80. </summary>
  81. <param name="task">The task to wrap.</param>
  82. <param name="callback">The callback method passed into the Begin method of the APM pattern.</param>
  83. <param name="state">The state passed into the Begin method of the APM pattern.</param>
  84. <returns>The asynchronous operation, to be returned by the Begin method of the APM pattern.</returns>
  85. </member>
  86. <member name="M:Nito.AsyncEx.Interop.ApmAsyncFactory.ToEnd(System.IAsyncResult)">
  87. <summary>
  88. Wraps a <see cref="T:System.Threading.Tasks.Task"/> into the End method of an APM pattern.
  89. </summary>
  90. <param name="asyncResult">The asynchronous operation returned by the matching Begin method of this APM pattern.</param>
  91. <returns>The result of the asynchronous operation, to be returned by the End method of the APM pattern.</returns>
  92. </member>
  93. <member name="M:Nito.AsyncEx.Interop.ApmAsyncFactory.ToBegin``1(System.Threading.Tasks.Task{``0},System.AsyncCallback,System.Object)">
  94. <summary>
  95. Wraps a <see cref="T:System.Threading.Tasks.Task`1"/> into the Begin method of an APM pattern.
  96. </summary>
  97. <param name="task">The task to wrap. May not be <c>null</c>.</param>
  98. <param name="callback">The callback method passed into the Begin method of the APM pattern.</param>
  99. <param name="state">The state passed into the Begin method of the APM pattern.</param>
  100. <returns>The asynchronous operation, to be returned by the Begin method of the APM pattern.</returns>
  101. </member>
  102. <member name="M:Nito.AsyncEx.Interop.ApmAsyncFactory.ToEnd``1(System.IAsyncResult)">
  103. <summary>
  104. Wraps a <see cref="T:System.Threading.Tasks.Task`1"/> into the End method of an APM pattern.
  105. </summary>
  106. <param name="asyncResult">The asynchronous operation returned by the matching Begin method of this APM pattern.</param>
  107. <returns>The result of the asynchronous operation, to be returned by the End method of the APM pattern.</returns>
  108. </member>
  109. <member name="T:Nito.AsyncEx.Interop.EventArguments`2">
  110. <summary>
  111. Arguments passed to a .NET event that follows the standard <c>sender, arguments</c> event pattern.
  112. </summary>
  113. <typeparam name="TSender">The type of the sender of the event. This is commonly <see cref="T:System.Object"/>.</typeparam>
  114. <typeparam name="TEventArgs">The type of the event arguments. This is commonly <see cref="P:Nito.AsyncEx.Interop.EventArguments`2.EventArgs"/> or a derived type.</typeparam>
  115. </member>
  116. <member name="P:Nito.AsyncEx.Interop.EventArguments`2.Sender">
  117. <summary>
  118. The sender of the event.
  119. </summary>
  120. </member>
  121. <member name="P:Nito.AsyncEx.Interop.EventArguments`2.EventArgs">
  122. <summary>
  123. The event arguments.
  124. </summary>
  125. </member>
  126. <member name="T:Nito.AsyncEx.Interop.EventAsyncFactory">
  127. <summary>
  128. Creation methods for tasks wrapping events.
  129. </summary>
  130. </member>
  131. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromAnyEvent``2(System.Func{System.Action{``1},``0},System.Action{``0},System.Action{``0},System.Threading.CancellationToken,System.Boolean)">
  132. <summary>
  133. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of any type.
  134. </summary>
  135. <typeparam name="TDelegate">The type of the event delegate.</typeparam>
  136. <typeparam name="TEventArguments">A type containing all event arguments.</typeparam>
  137. <param name="convert">A conversion delegate that takes an <see cref="T:System.Action`1"/> and converts it to a <typeparamref name="TDelegate"/>. This is generally of the form <c>x => (...) => x(new TEventArguments(...))</c>.</param>
  138. <param name="subscribe">A method that takes a <typeparamref name="TDelegate"/> and subscribes it to the event.</param>
  139. <param name="unsubscribe">A method that takes an <typeparamref name="TDelegate"/> and unsubscribes it from the event. This method is invoked in a captured context if <paramref name="unsubscribeOnCapturedContext"/> is <c>true</c>.</param>
  140. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  141. <param name="unsubscribeOnCapturedContext">Whether to invoke <paramref name="unsubscribe"/> on a captured context.</param>
  142. <remarks>
  143. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  144. </remarks>
  145. </member>
  146. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromAnyEvent``2(System.Func{System.Action{``1},``0},System.Action{``0},System.Action{``0},System.Threading.CancellationToken)">
  147. <summary>
  148. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of any type.
  149. </summary>
  150. <typeparam name="TDelegate">The type of the event delegate.</typeparam>
  151. <typeparam name="TEventArguments">A type containing all event arguments.</typeparam>
  152. <param name="convert">A conversion delegate that takes an <see cref="T:System.Action`1"/> and converts it to a <typeparamref name="TDelegate"/>. This is generally of the form <c>x => (...) => x(new TEventArguments(...))</c>.</param>
  153. <param name="subscribe">A method that takes a <typeparamref name="TDelegate"/> and subscribes it to the event.</param>
  154. <param name="unsubscribe">A method that takes a <typeparamref name="TDelegate"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  155. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  156. <remarks>
  157. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  158. </remarks>
  159. </member>
  160. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromAnyEvent``2(System.Func{System.Action{``1},``0},System.Action{``0},System.Action{``0})">
  161. <summary>
  162. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of any type.
  163. </summary>
  164. <typeparam name="TDelegate">The type of the event delegate.</typeparam>
  165. <typeparam name="TEventArguments">A type containing all event arguments.</typeparam>
  166. <param name="convert">A conversion delegate that takes an <see cref="T:System.Action`1"/> and converts it to a <typeparamref name="TDelegate"/>. This is generally of the form <c>x => (...) => x(new TEventArguments(...))</c>.</param>
  167. <param name="subscribe">A method that takes a <typeparamref name="TDelegate"/> and subscribes it to the event.</param>
  168. <param name="unsubscribe">A method that takes a <typeparamref name="TDelegate"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  169. <remarks>
  170. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  171. </remarks>
  172. </member>
  173. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent(System.Action{System.EventHandler},System.Action{System.EventHandler},System.Threading.CancellationToken,System.Boolean)">
  174. <summary>
  175. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.EventHandler"/>.
  176. </summary>
  177. <param name="subscribe">A method that takes a <see cref="T:System.EventHandler"/> and subscribes it to the event.</param>
  178. <param name="unsubscribe">A method that takes an <see cref="T:System.EventHandler"/> and unsubscribes it from the event. This method is invoked in a captured context if <paramref name="unsubscribeOnCapturedContext"/> is <c>true</c>.</param>
  179. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  180. <param name="unsubscribeOnCapturedContext">Whether to invoke <paramref name="unsubscribe"/> on a captured context.</param>
  181. <remarks>
  182. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  183. </remarks>
  184. </member>
  185. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent(System.Action{System.EventHandler},System.Action{System.EventHandler},System.Threading.CancellationToken)">
  186. <summary>
  187. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.EventHandler"/>.
  188. </summary>
  189. <param name="subscribe">A method that takes a <see cref="T:System.EventHandler"/> and subscribes it to the event.</param>
  190. <param name="unsubscribe">A method that takes a <see cref="T:System.EventHandler"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  191. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  192. <remarks>
  193. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  194. </remarks>
  195. </member>
  196. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent(System.Action{System.EventHandler},System.Action{System.EventHandler})">
  197. <summary>
  198. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.EventHandler"/>.
  199. </summary>
  200. <param name="subscribe">A method that takes a <see cref="T:System.EventHandler"/> and subscribes it to the event.</param>
  201. <param name="unsubscribe">A method that takes a <see cref="T:System.EventHandler"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  202. <remarks>
  203. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  204. </remarks>
  205. </member>
  206. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent``1(System.Action{System.EventHandler{``0}},System.Action{System.EventHandler{``0}},System.Threading.CancellationToken,System.Boolean)">
  207. <summary>
  208. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.EventHandler`1"/>.
  209. </summary>
  210. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  211. <param name="subscribe">A method that takes a <see cref="T:System.EventHandler`1"/> and subscribes it to the event.</param>
  212. <param name="unsubscribe">A method that takes an <see cref="T:System.EventHandler`1"/> and unsubscribes it from the event. This method is invoked in a captured context if <paramref name="unsubscribeOnCapturedContext"/> is <c>true</c>.</param>
  213. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  214. <param name="unsubscribeOnCapturedContext">Whether to invoke <paramref name="unsubscribe"/> on a captured context.</param>
  215. <remarks>
  216. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  217. </remarks>
  218. </member>
  219. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent``1(System.Action{System.EventHandler{``0}},System.Action{System.EventHandler{``0}},System.Threading.CancellationToken)">
  220. <summary>
  221. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.EventHandler`1"/>.
  222. </summary>
  223. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  224. <param name="subscribe">A method that takes a <see cref="T:System.EventHandler`1"/> and subscribes it to the event.</param>
  225. <param name="unsubscribe">A method that takes a <see cref="T:System.EventHandler`1"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  226. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  227. <remarks>
  228. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  229. </remarks>
  230. </member>
  231. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent``1(System.Action{System.EventHandler{``0}},System.Action{System.EventHandler{``0}})">
  232. <summary>
  233. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.EventHandler`1"/>.
  234. </summary>
  235. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  236. <param name="subscribe">A method that takes a <see cref="T:System.EventHandler`1"/> and subscribes it to the event.</param>
  237. <param name="unsubscribe">A method that takes a <see cref="T:System.EventHandler`1"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  238. <remarks>
  239. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  240. </remarks>
  241. </member>
  242. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent``2(System.Func{System.EventHandler{``1},``0},System.Action{``0},System.Action{``0},System.Threading.CancellationToken,System.Boolean)">
  243. <summary>
  244. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that follow the standard <c>sender, eventArgs</c> pattern but with a custom delegate type.
  245. </summary>
  246. <typeparam name="TDelegate">The type of the event delegate.</typeparam>
  247. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  248. <param name="convert">A conversion delegate that takes an <see cref="T:System.EventHandler`1"/> and converts it to a <typeparamref name="TDelegate"/>. If the type parameters are specified explicitly, this should be <c>x => x.Invoke</c>. If the type parameters are inferred, this should be <c>(EventHandler&lt;TEventArgs&gt; x) => new TDelegate(x)</c> with appropriate substitutions for <typeparamref name="TEventArgs"/> and <typeparamref name="TDelegate"/>.</param>
  249. <param name="subscribe">A method that takes a <typeparamref name="TDelegate"/> and subscribes it to the event.</param>
  250. <param name="unsubscribe">A method that takes an <typeparamref name="TDelegate"/> and unsubscribes it from the event. This method is invoked in a captured context if <paramref name="unsubscribeOnCapturedContext"/> is <c>true</c>.</param>
  251. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  252. <param name="unsubscribeOnCapturedContext">Whether to invoke <paramref name="unsubscribe"/> on a captured context.</param>
  253. <remarks>
  254. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  255. </remarks>
  256. </member>
  257. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent``2(System.Func{System.EventHandler{``1},``0},System.Action{``0},System.Action{``0},System.Threading.CancellationToken)">
  258. <summary>
  259. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that follow the standard <c>sender, eventArgs</c> pattern but with a custom delegate type.
  260. </summary>
  261. <typeparam name="TDelegate">The type of the event delegate.</typeparam>
  262. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  263. <param name="convert">A conversion delegate that takes an <see cref="T:System.EventHandler`1"/> and converts it to a <typeparamref name="TDelegate"/>. If the type parameters are specified explicitly, this should be <c>x => x.Invoke</c>. If the type parameters are inferred, this should be <c>(EventHandler&lt;TEventArgs&gt; x) => new TDelegate(x)</c> with appropriate substitutions for <typeparamref name="TEventArgs"/> and <typeparamref name="TDelegate"/>.</param>
  264. <param name="subscribe">A method that takes a <typeparamref name="TDelegate"/> and subscribes it to the event.</param>
  265. <param name="unsubscribe">A method that takes a <typeparamref name="TDelegate"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  266. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  267. <remarks>
  268. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  269. </remarks>
  270. </member>
  271. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromEvent``2(System.Func{System.EventHandler{``1},``0},System.Action{``0},System.Action{``0})">
  272. <summary>
  273. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that follow the standard <c>sender, eventArgs</c> pattern but with a custom delegate type.
  274. </summary>
  275. <typeparam name="TDelegate">The type of the event delegate.</typeparam>
  276. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  277. <param name="convert">A conversion delegate that takes an <see cref="T:System.EventHandler`1"/> and converts it to a <typeparamref name="TDelegate"/>. If the type parameters are specified explicitly, this should be <c>x => x.Invoke</c>. If the type parameters are inferred, this should be <c>(EventHandler&lt;TEventArgs&gt; x) => new TDelegate(x)</c> with appropriate substitutions for <typeparamref name="TEventArgs"/> and <typeparamref name="TDelegate"/>.</param>
  278. <param name="subscribe">A method that takes a <typeparamref name="TDelegate"/> and subscribes it to the event.</param>
  279. <param name="unsubscribe">A method that takes a <typeparamref name="TDelegate"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  280. <remarks>
  281. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  282. </remarks>
  283. </member>
  284. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent``2(System.Action{System.Action{``0,``1}},System.Action{System.Action{``0,``1}},System.Threading.CancellationToken,System.Boolean)">
  285. <summary>
  286. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action`2"/>.
  287. </summary>
  288. <typeparam name="TSender">The type of the "sender" (the first event argument).</typeparam>
  289. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  290. <param name="subscribe">A method that takes an <see cref="T:System.Action`2"/> and subscribes it to the event.</param>
  291. <param name="unsubscribe">A method that takes an <see cref="T:System.Action`2"/> and unsubscribes it from the event. This method is invoked in a captured context if <paramref name="unsubscribeOnCapturedContext"/> is <c>true</c>.</param>
  292. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  293. <param name="unsubscribeOnCapturedContext">Whether to invoke <paramref name="unsubscribe"/> on a captured context.</param>
  294. <remarks>
  295. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  296. </remarks>
  297. </member>
  298. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent``2(System.Action{System.Action{``0,``1}},System.Action{System.Action{``0,``1}},System.Threading.CancellationToken)">
  299. <summary>
  300. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action`2"/>.
  301. </summary>
  302. <typeparam name="TSender">The type of the "sender" (the first event argument).</typeparam>
  303. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  304. <param name="subscribe">A method that takes an <see cref="T:System.Action`2"/> and subscribes it to the event.</param>
  305. <param name="unsubscribe">A method that takes an <see cref="T:System.Action`2"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  306. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  307. <remarks>
  308. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  309. </remarks>
  310. </member>
  311. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent``2(System.Action{System.Action{``0,``1}},System.Action{System.Action{``0,``1}})">
  312. <summary>
  313. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action`2"/>.
  314. </summary>
  315. <typeparam name="TSender">The type of the "sender" (the first event argument).</typeparam>
  316. <typeparam name="TEventArgs">The type of the "arguments" (the second event argument).</typeparam>
  317. <param name="subscribe">A method that takes an <see cref="T:System.Action`2"/> and subscribes it to the event.</param>
  318. <param name="unsubscribe">A method that takes an <see cref="T:System.Action`2"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  319. <remarks>
  320. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  321. </remarks>
  322. </member>
  323. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent``1(System.Action{System.Action{``0}},System.Action{System.Action{``0}},System.Threading.CancellationToken,System.Boolean)">
  324. <summary>
  325. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action`1"/>.
  326. </summary>
  327. <typeparam name="TEventArgs">The type of the argument passed to the event handler and used to complete the task.</typeparam>
  328. <param name="subscribe">A method that takes an <see cref="T:System.Action`1"/> and subscribes it to the event.</param>
  329. <param name="unsubscribe">A method that takes an <see cref="T:System.Action`1"/> and unsubscribes it from the event. This method is invoked in a captured context if <paramref name="unsubscribeOnCapturedContext"/> is <c>true</c>.</param>
  330. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  331. <param name="unsubscribeOnCapturedContext">Whether to invoke <paramref name="unsubscribe"/> on a captured context.</param>
  332. <remarks>
  333. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  334. </remarks>
  335. </member>
  336. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent``1(System.Action{System.Action{``0}},System.Action{System.Action{``0}},System.Threading.CancellationToken)">
  337. <summary>
  338. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action`1"/>.
  339. </summary>
  340. <typeparam name="TEventArgs">The type of the argument passed to the event handler and used to complete the task.</typeparam>
  341. <param name="subscribe">A method that takes an <see cref="T:System.Action`1"/> and subscribes it to the event.</param>
  342. <param name="unsubscribe">A method that takes an <see cref="T:System.Action`1"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  343. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  344. <remarks>
  345. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  346. </remarks>
  347. </member>
  348. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent``1(System.Action{System.Action{``0}},System.Action{System.Action{``0}})">
  349. <summary>
  350. Returns a <see cref="T:System.Threading.Tasks.Task`1"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action`1"/>.
  351. </summary>
  352. <typeparam name="TEventArgs">The type of the argument passed to the event handler and used to complete the task.</typeparam>
  353. <param name="subscribe">A method that takes an <see cref="T:System.Action`1"/> and subscribes it to the event.</param>
  354. <param name="unsubscribe">A method that takes an <see cref="T:System.Action`1"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  355. <remarks>
  356. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  357. </remarks>
  358. </member>
  359. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent(System.Action{System.Action},System.Action{System.Action},System.Threading.CancellationToken,System.Boolean)">
  360. <summary>
  361. Returns a <see cref="T:System.Threading.Tasks.Task"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action"/>.
  362. </summary>
  363. <param name="subscribe">A method that takes an <see cref="T:System.Action"/> and subscribes it to the event.</param>
  364. <param name="unsubscribe">A method that takes an <see cref="T:System.Action"/> and unsubscribes it from the event. This method is invoked in a captured context if <paramref name="unsubscribeOnCapturedContext"/> is <c>true</c>.</param>
  365. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  366. <param name="unsubscribeOnCapturedContext">Whether to invoke <paramref name="unsubscribe"/> on a captured context.</param>
  367. <remarks>
  368. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  369. </remarks>
  370. </member>
  371. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent(System.Action{System.Action},System.Action{System.Action},System.Threading.CancellationToken)">
  372. <summary>
  373. Returns a <see cref="T:System.Threading.Tasks.Task"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action"/>.
  374. </summary>
  375. <param name="subscribe">A method that takes an <see cref="T:System.Action"/> and subscribes it to the event.</param>
  376. <param name="unsubscribe">A method that takes an <see cref="T:System.Action"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  377. <param name="cancellationToken">A cancellation token that can be used to cancel the task (and unsubscribe from the event handler).</param>
  378. <remarks>
  379. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  380. </remarks>
  381. </member>
  382. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.FromActionEvent(System.Action{System.Action},System.Action{System.Action})">
  383. <summary>
  384. Returns a <see cref="T:System.Threading.Tasks.Task"/> that completes when a specified event next fires. This overload is for events that are of type <see cref="T:System.Action"/>.
  385. </summary>
  386. <param name="subscribe">A method that takes an <see cref="T:System.Action"/> and subscribes it to the event.</param>
  387. <param name="unsubscribe">A method that takes an <see cref="T:System.Action"/> and unsubscribes it from the event. This method is always invoked in a captured context.</param>
  388. <remarks>
  389. <para>Calling this method in a loop is often an anti-pattern, because the event is only subscribed to when this method is invoked, and is unsubscribed from when the task completes. From the time the task is completed until this method is called again, the event may fire and be "lost". If you find yourself needing a loop around this method, consider using Rx or TPL Dataflow instead.</para>
  390. </remarks>
  391. </member>
  392. <member name="M:Nito.AsyncEx.Interop.EventAsyncFactory.CreateEventArguments``2(``0,``1)">
  393. <summary>
  394. Creates an <see cref="T:Nito.AsyncEx.Interop.EventArguments`2"/> structure.
  395. </summary>
  396. <typeparam name="TSender">The type of the sender of the event.</typeparam>
  397. <typeparam name="TEventArgs">The event arguments.</typeparam>
  398. <param name="sender">The sender of the event.</param>
  399. <param name="eventArgs">The event arguments.</param>
  400. </member>
  401. <member name="T:Nito.AsyncEx.SemaphoreSlimExtensions">
  402. <summary>
  403. Provides extension methods for <see cref="T:System.Threading.SemaphoreSlim"/>.
  404. </summary>
  405. </member>
  406. <member name="M:Nito.AsyncEx.SemaphoreSlimExtensions.LockAsync(System.Threading.SemaphoreSlim,System.Threading.CancellationToken)">
  407. <summary>
  408. Asynchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
  409. </summary>
  410. <param name="this">The semaphore to lock.</param>
  411. <param name="cancellationToken">The cancellation token used to cancel the wait.</param>
  412. </member>
  413. <member name="M:Nito.AsyncEx.SemaphoreSlimExtensions.LockAsync(System.Threading.SemaphoreSlim)">
  414. <summary>
  415. Asynchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
  416. </summary>
  417. </member>
  418. <member name="M:Nito.AsyncEx.SemaphoreSlimExtensions.Lock(System.Threading.SemaphoreSlim,System.Threading.CancellationToken)">
  419. <summary>
  420. Synchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
  421. </summary>
  422. <param name="this">The semaphore to lock.</param>
  423. <param name="cancellationToken">The cancellation token used to cancel the wait.</param>
  424. </member>
  425. <member name="M:Nito.AsyncEx.SemaphoreSlimExtensions.Lock(System.Threading.SemaphoreSlim)">
  426. <summary>
  427. Synchronously waits on the semaphore, and returns a disposable that releases the semaphore when disposed, thus treating this semaphore as a "multi-lock".
  428. </summary>
  429. <param name="this">The semaphore to lock.</param>
  430. </member>
  431. <member name="T:Nito.AsyncEx.SynchronizationContextExtensions">
  432. <summary>
  433. Provides extension methods for <see cref="T:System.Threading.SynchronizationContext"/>.
  434. </summary>
  435. </member>
  436. <member name="M:Nito.AsyncEx.SynchronizationContextExtensions.Send(System.Threading.SynchronizationContext,System.Action)">
  437. <summary>
  438. Synchronously executes a delegate on this synchronization context.
  439. </summary>
  440. <param name="this">The synchronization context.</param>
  441. <param name="action">The delegate to execute.</param>
  442. </member>
  443. <member name="M:Nito.AsyncEx.SynchronizationContextExtensions.Send``1(System.Threading.SynchronizationContext,System.Func{``0})">
  444. <summary>
  445. Synchronously executes a delegate on this synchronization context and returns its result.
  446. </summary>
  447. <typeparam name="T">The type of the result.</typeparam>
  448. <param name="this">The synchronization context.</param>
  449. <param name="action">The delegate to execute.</param>
  450. </member>
  451. <member name="M:Nito.AsyncEx.SynchronizationContextExtensions.PostAsync(System.Threading.SynchronizationContext,System.Action)">
  452. <summary>
  453. Asynchronously executes a delegate on this synchronization context.
  454. </summary>
  455. <param name="this">The synchronization context.</param>
  456. <param name="action">The delegate to execute.</param>
  457. </member>
  458. <member name="M:Nito.AsyncEx.SynchronizationContextExtensions.PostAsync``1(System.Threading.SynchronizationContext,System.Func{``0})">
  459. <summary>
  460. Asynchronously executes a delegate on this synchronization context and returns its result.
  461. </summary>
  462. <typeparam name="T">The type of the result.</typeparam>
  463. <param name="this">The synchronization context.</param>
  464. <param name="action">The delegate to execute.</param>
  465. </member>
  466. <member name="M:Nito.AsyncEx.SynchronizationContextExtensions.PostAsync(System.Threading.SynchronizationContext,System.Func{System.Threading.Tasks.Task})">
  467. <summary>
  468. Asynchronously executes an asynchronous delegate on this synchronization context.
  469. </summary>
  470. <param name="this">The synchronization context.</param>
  471. <param name="action">The delegate to execute.</param>
  472. </member>
  473. <member name="M:Nito.AsyncEx.SynchronizationContextExtensions.PostAsync``1(System.Threading.SynchronizationContext,System.Func{System.Threading.Tasks.Task{``0}})">
  474. <summary>
  475. Asynchronously executes an asynchronous delegate on this synchronization context and returns its result.
  476. </summary>
  477. <typeparam name="T">The type of the result.</typeparam>
  478. <param name="this">The synchronization context.</param>
  479. <param name="action">The delegate to execute.</param>
  480. </member>
  481. <member name="T:Nito.AsyncEx.SynchronizationContextSwitcher">
  482. <summary>
  483. Utility class for temporarily switching <see cref="T:System.Threading.SynchronizationContext"/> implementations.
  484. </summary>
  485. </member>
  486. <member name="F:Nito.AsyncEx.SynchronizationContextSwitcher._oldContext">
  487. <summary>
  488. The previous <see cref="T:System.Threading.SynchronizationContext"/>.
  489. </summary>
  490. </member>
  491. <member name="M:Nito.AsyncEx.SynchronizationContextSwitcher.#ctor(System.Threading.SynchronizationContext)">
  492. <summary>
  493. Initializes a new instance of the <see cref="T:Nito.AsyncEx.SynchronizationContextSwitcher"/> class, installing the new <see cref="T:System.Threading.SynchronizationContext"/>.
  494. </summary>
  495. <param name="newContext">The new <see cref="T:System.Threading.SynchronizationContext"/>. This can be <c>null</c> to remove an existing <see cref="T:System.Threading.SynchronizationContext"/>.</param>
  496. </member>
  497. <member name="M:Nito.AsyncEx.SynchronizationContextSwitcher.Dispose(System.Object)">
  498. <summary>
  499. Restores the old <see cref="T:System.Threading.SynchronizationContext"/>.
  500. </summary>
  501. </member>
  502. <member name="M:Nito.AsyncEx.SynchronizationContextSwitcher.NoContext(System.Action)">
  503. <summary>
  504. Executes a synchronous delegate without the current <see cref="T:System.Threading.SynchronizationContext"/>. The current context is restored when this function returns.
  505. </summary>
  506. <param name="action">The delegate to execute.</param>
  507. </member>
  508. <member name="M:Nito.AsyncEx.SynchronizationContextSwitcher.NoContext``1(System.Func{``0})">
  509. <summary>
  510. Executes a synchronous or asynchronous delegate without the current <see cref="T:System.Threading.SynchronizationContext"/>. The current context is restored when this function synchronously returns.
  511. </summary>
  512. <param name="action">The delegate to execute.</param>
  513. </member>
  514. <member name="M:Nito.AsyncEx.SynchronizationContextSwitcher.ApplyContext(System.Threading.SynchronizationContext,System.Action)">
  515. <summary>
  516. Executes a synchronous delegate with the specified <see cref="T:System.Threading.SynchronizationContext"/> as "current". The previous current context is restored when this function returns.
  517. </summary>
  518. <param name="context">The context to treat as "current". May be <c>null</c> to indicate the thread pool context.</param>
  519. <param name="action">The delegate to execute.</param>
  520. </member>
  521. <member name="M:Nito.AsyncEx.SynchronizationContextSwitcher.ApplyContext``1(System.Threading.SynchronizationContext,System.Func{``0})">
  522. <summary>
  523. Executes a synchronous or asynchronous delegate without the specified <see cref="T:System.Threading.SynchronizationContext"/> as "current". The previous current context is restored when this function synchronously returns.
  524. </summary>
  525. <param name="context">The context to treat as "current". May be <c>null</c> to indicate the thread pool context.</param>
  526. <param name="action">The delegate to execute.</param>
  527. </member>
  528. <member name="T:Nito.AsyncEx.Synchronous.TaskExtensions">
  529. <summary>
  530. Provides synchronous extension methods for tasks.
  531. </summary>
  532. </member>
  533. <member name="M:Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(System.Threading.Tasks.Task)">
  534. <summary>
  535. Waits for the task to complete, unwrapping any exceptions.
  536. </summary>
  537. <param name="task">The task. May not be <c>null</c>.</param>
  538. </member>
  539. <member name="M:Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(System.Threading.Tasks.Task,System.Threading.CancellationToken)">
  540. <summary>
  541. Waits for the task to complete, unwrapping any exceptions.
  542. </summary>
  543. <param name="task">The task. May not be <c>null</c>.</param>
  544. <param name="cancellationToken">A cancellation token to observe while waiting for the task to complete.</param>
  545. <exception cref="T:System.OperationCanceledException">The <paramref name="cancellationToken"/> was cancelled before the <paramref name="task"/> completed, or the <paramref name="task"/> raised an <see cref="T:System.OperationCanceledException"/>.</exception>
  546. </member>
  547. <member name="M:Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException``1(System.Threading.Tasks.Task{``0})">
  548. <summary>
  549. Waits for the task to complete, unwrapping any exceptions.
  550. </summary>
  551. <typeparam name="TResult">The type of the result of the task.</typeparam>
  552. <param name="task">The task. May not be <c>null</c>.</param>
  553. <returns>The result of the task.</returns>
  554. </member>
  555. <member name="M:Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException``1(System.Threading.Tasks.Task{``0},System.Threading.CancellationToken)">
  556. <summary>
  557. Waits for the task to complete, unwrapping any exceptions.
  558. </summary>
  559. <typeparam name="TResult">The type of the result of the task.</typeparam>
  560. <param name="task">The task. May not be <c>null</c>.</param>
  561. <param name="cancellationToken">A cancellation token to observe while waiting for the task to complete.</param>
  562. <returns>The result of the task.</returns>
  563. <exception cref="T:System.OperationCanceledException">The <paramref name="cancellationToken"/> was cancelled before the <paramref name="task"/> completed, or the <paramref name="task"/> raised an <see cref="T:System.OperationCanceledException"/>.</exception>
  564. </member>
  565. <member name="M:Nito.AsyncEx.Synchronous.TaskExtensions.WaitWithoutException(System.Threading.Tasks.Task)">
  566. <summary>
  567. Waits for the task to complete, but does not raise task exceptions. The task exception (if any) is unobserved.
  568. </summary>
  569. <param name="task">The task. May not be <c>null</c>.</param>
  570. </member>
  571. <member name="M:Nito.AsyncEx.Synchronous.TaskExtensions.WaitWithoutException(System.Threading.Tasks.Task,System.Threading.CancellationToken)">
  572. <summary>
  573. Waits for the task to complete, but does not raise task exceptions. The task exception (if any) is unobserved.
  574. </summary>
  575. <param name="task">The task. May not be <c>null</c>.</param>
  576. <param name="cancellationToken">A cancellation token to observe while waiting for the task to complete.</param>
  577. <exception cref="T:System.OperationCanceledException">The <paramref name="cancellationToken"/> was cancelled before the <paramref name="task"/> completed.</exception>
  578. </member>
  579. <member name="T:Nito.AsyncEx.TaskCompletionSourceExtensions">
  580. <summary>
  581. Provides extension methods for <see cref="T:System.Threading.Tasks.TaskCompletionSource`1"/>.
  582. </summary>
  583. </member>
  584. <member name="M:Nito.AsyncEx.TaskCompletionSourceExtensions.TryCompleteFromCompletedTask``2(System.Threading.Tasks.TaskCompletionSource{``0},System.Threading.Tasks.Task{``1})">
  585. <summary>
  586. Attempts to complete a <see cref="T:System.Threading.Tasks.TaskCompletionSource`1"/>, propagating the completion of <paramref name="task"/>.
  587. </summary>
  588. <typeparam name="TResult">The type of the result of the target asynchronous operation.</typeparam>
  589. <typeparam name="TSourceResult">The type of the result of the source asynchronous operation.</typeparam>
  590. <param name="this">The task completion source. May not be <c>null</c>.</param>
  591. <param name="task">The task. May not be <c>null</c>.</param>
  592. <returns><c>true</c> if this method completed the task completion source; <c>false</c> if it was already completed.</returns>
  593. </member>
  594. <member name="M:Nito.AsyncEx.TaskCompletionSourceExtensions.TryCompleteFromCompletedTask``1(System.Threading.Tasks.TaskCompletionSource{``0},System.Threading.Tasks.Task,System.Func{``0})">
  595. <summary>
  596. Attempts to complete a <see cref="T:System.Threading.Tasks.TaskCompletionSource`1"/>, propagating the completion of <paramref name="task"/> but using the result value from <paramref name="resultFunc"/> if the task completed successfully.
  597. </summary>
  598. <typeparam name="TResult">The type of the result of the target asynchronous operation.</typeparam>
  599. <param name="this">The task completion source. May not be <c>null</c>.</param>
  600. <param name="task">The task. May not be <c>null</c>.</param>
  601. <param name="resultFunc">A delegate that returns the result with which to complete the task completion source, if the task completed successfully. May not be <c>null</c>.</param>
  602. <returns><c>true</c> if this method completed the task completion source; <c>false</c> if it was already completed.</returns>
  603. </member>
  604. <member name="M:Nito.AsyncEx.TaskCompletionSourceExtensions.CreateAsyncTaskSource``1">
  605. <summary>
  606. Creates a new TCS for use with async code, and which forces its continuations to execute asynchronously.
  607. </summary>
  608. <typeparam name="TResult">The type of the result of the TCS.</typeparam>
  609. </member>
  610. <member name="T:Nito.AsyncEx.TaskConstants">
  611. <summary>
  612. Provides completed task constants.
  613. </summary>
  614. </member>
  615. <member name="P:Nito.AsyncEx.TaskConstants.BooleanTrue">
  616. <summary>
  617. A task that has been completed with the value <c>true</c>.
  618. </summary>
  619. </member>
  620. <member name="P:Nito.AsyncEx.TaskConstants.BooleanFalse">
  621. <summary>
  622. A task that has been completed with the value <c>false</c>.
  623. </summary>
  624. </member>
  625. <member name="P:Nito.AsyncEx.TaskConstants.Int32Zero">
  626. <summary>
  627. A task that has been completed with the value <c>0</c>.
  628. </summary>
  629. </member>
  630. <member name="P:Nito.AsyncEx.TaskConstants.Int32NegativeOne">
  631. <summary>
  632. A task that has been completed with the value <c>-1</c>.
  633. </summary>
  634. </member>
  635. <member name="P:Nito.AsyncEx.TaskConstants.Completed">
  636. <summary>
  637. A <see cref="T:System.Threading.Tasks.Task"/> that has been completed.
  638. </summary>
  639. </member>
  640. <member name="P:Nito.AsyncEx.TaskConstants.Canceled">
  641. <summary>
  642. A task that has been canceled.
  643. </summary>
  644. </member>
  645. <member name="T:Nito.AsyncEx.TaskConstants`1">
  646. <summary>
  647. Provides completed task constants.
  648. </summary>
  649. <typeparam name="T">The type of the task result.</typeparam>
  650. </member>
  651. <member name="P:Nito.AsyncEx.TaskConstants`1.Default">
  652. <summary>
  653. A task that has been completed with the default value of <typeparamref name="T"/>.
  654. </summary>
  655. </member>
  656. <member name="P:Nito.AsyncEx.TaskConstants`1.Canceled">
  657. <summary>
  658. A task that has been canceled.
  659. </summary>
  660. </member>
  661. <member name="T:Nito.AsyncEx.TaskExtensions">
  662. <summary>
  663. Provides extension methods for the <see cref="T:System.Threading.Tasks.Task"/> and <see cref="T:System.Threading.Tasks.Task`1"/> types.
  664. </summary>
  665. </member>
  666. <member name="M:Nito.AsyncEx.TaskExtensions.WaitAsync(System.Threading.Tasks.Task,System.Threading.CancellationToken)">
  667. <summary>
  668. Asynchronously waits for the task to complete, or for the cancellation token to be canceled.
  669. </summary>
  670. <param name="this">The task to wait for. May not be <c>null</c>.</param>
  671. <param name="cancellationToken">The cancellation token that cancels the wait.</param>
  672. </member>
  673. <member name="M:Nito.AsyncEx.TaskExtensions.WaitAsync``1(System.Threading.Tasks.Task{``0},System.Threading.CancellationToken)">
  674. <summary>
  675. Asynchronously waits for the task to complete, or for the cancellation token to be canceled.
  676. </summary>
  677. <typeparam name="TResult">The type of the task result.</typeparam>
  678. <param name="this">The task to wait for. May not be <c>null</c>.</param>
  679. <param name="cancellationToken">The cancellation token that cancels the wait.</param>
  680. </member>
  681. <member name="M:Nito.AsyncEx.TaskExtensions.WhenAny(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task},System.Threading.CancellationToken)">
  682. <summary>
  683. Asynchronously waits for any of the source tasks to complete, or for the cancellation token to be canceled.
  684. </summary>
  685. <param name="this">The tasks to wait for. May not be <c>null</c>.</param>
  686. <param name="cancellationToken">The cancellation token that cancels the wait.</param>
  687. </member>
  688. <member name="M:Nito.AsyncEx.TaskExtensions.WhenAny(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task})">
  689. <summary>
  690. Asynchronously waits for any of the source tasks to complete.
  691. </summary>
  692. <param name="this">The tasks to wait for. May not be <c>null</c>.</param>
  693. </member>
  694. <member name="M:Nito.AsyncEx.TaskExtensions.WhenAny``1(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task{``0}},System.Threading.CancellationToken)">
  695. <summary>
  696. Asynchronously waits for any of the source tasks to complete, or for the cancellation token to be canceled.
  697. </summary>
  698. <typeparam name="TResult">The type of the task results.</typeparam>
  699. <param name="this">The tasks to wait for. May not be <c>null</c>.</param>
  700. <param name="cancellationToken">The cancellation token that cancels the wait.</param>
  701. </member>
  702. <member name="M:Nito.AsyncEx.TaskExtensions.WhenAny``1(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task{``0}})">
  703. <summary>
  704. Asynchronously waits for any of the source tasks to complete.
  705. </summary>
  706. <typeparam name="TResult">The type of the task results.</typeparam>
  707. <param name="this">The tasks to wait for. May not be <c>null</c>.</param>
  708. </member>
  709. <member name="M:Nito.AsyncEx.TaskExtensions.WhenAll(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task})">
  710. <summary>
  711. Asynchronously waits for all of the source tasks to complete.
  712. </summary>
  713. <param name="this">The tasks to wait for. May not be <c>null</c>.</param>
  714. </member>
  715. <member name="M:Nito.AsyncEx.TaskExtensions.WhenAll``1(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task{``0}})">
  716. <summary>
  717. Asynchronously waits for all of the source tasks to complete.
  718. </summary>
  719. <typeparam name="TResult">The type of the task results.</typeparam>
  720. <param name="this">The tasks to wait for. May not be <c>null</c>.</param>
  721. </member>
  722. <member name="M:Nito.AsyncEx.TaskExtensions.Ignore(System.Threading.Tasks.Task)">
  723. <summary>
  724. DANGEROUS! Ignores the completion of this task. Also ignores exceptions.
  725. </summary>
  726. <param name="this">The task to ignore.</param>
  727. </member>
  728. <member name="M:Nito.AsyncEx.TaskExtensions.Ignore``1(System.Threading.Tasks.Task{``0})">
  729. <summary>
  730. DANGEROUS! Ignores the completion and results of this task. Also ignores exceptions.
  731. </summary>
  732. <param name="this">The task to ignore.</param>
  733. </member>
  734. <member name="M:Nito.AsyncEx.TaskExtensions.OrderByCompletion``1(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task{``0}})">
  735. <summary>
  736. Creates a new collection of tasks that complete in order.
  737. </summary>
  738. <typeparam name="T">The type of the results of the tasks.</typeparam>
  739. <param name="this">The tasks to order by completion. May not be <c>null</c>.</param>
  740. </member>
  741. <member name="M:Nito.AsyncEx.TaskExtensions.OrderByCompletion(System.Collections.Generic.IEnumerable{System.Threading.Tasks.Task})">
  742. <summary>
  743. Creates a new collection of tasks that complete in order.
  744. </summary>
  745. <param name="this">The tasks to order by completion. May not be <c>null</c>.</param>
  746. </member>
  747. <member name="T:Nito.AsyncEx.TaskFactoryExtensions">
  748. <summary>
  749. Provides extension methods for task factories.
  750. </summary>
  751. </member>
  752. <member name="M:Nito.AsyncEx.TaskFactoryExtensions.Run(System.Threading.Tasks.TaskFactory,System.Action)">
  753. <summary>
  754. Queues work to the task factory and returns a <see cref="T:System.Threading.Tasks.Task"/> representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.
  755. </summary>
  756. <param name="this">The <see cref="T:System.Threading.Tasks.TaskFactory"/>. May not be <c>null</c>.</param>
  757. <param name="action">The action delegate to execute. May not be <c>null</c>.</param>
  758. <returns>The started task.</returns>
  759. </member>
  760. <member name="M:Nito.AsyncEx.TaskFactoryExtensions.Run``1(System.Threading.Tasks.TaskFactory,System.Func{``0})">
  761. <summary>
  762. Queues work to the task factory and returns a <see cref="T:System.Threading.Tasks.Task`1"/> representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.
  763. </summary>
  764. <param name="this">The <see cref="T:System.Threading.Tasks.TaskFactory"/>. May not be <c>null</c>.</param>
  765. <param name="action">The action delegate to execute. May not be <c>null</c>.</param>
  766. <returns>The started task.</returns>
  767. </member>
  768. <member name="M:Nito.AsyncEx.TaskFactoryExtensions.Run(System.Threading.Tasks.TaskFactory,System.Func{System.Threading.Tasks.Task})">
  769. <summary>
  770. Queues work to the task factory and returns a proxy <see cref="T:System.Threading.Tasks.Task"/> representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.
  771. </summary>
  772. <param name="this">The <see cref="T:System.Threading.Tasks.TaskFactory"/>. May not be <c>null</c>.</param>
  773. <param name="action">The action delegate to execute. May not be <c>null</c>.</param>
  774. <returns>The started task.</returns>
  775. </member>
  776. <member name="M:Nito.AsyncEx.TaskFactoryExtensions.Run``1(System.Threading.Tasks.TaskFactory,System.Func{System.Threading.Tasks.Task{``0}})">
  777. <summary>
  778. Queues work to the task factory and returns a proxy <see cref="T:System.Threading.Tasks.Task`1"/> representing that work. If the task factory does not specify a task scheduler, the thread pool task scheduler is used.
  779. </summary>
  780. <param name="this">The <see cref="T:System.Threading.Tasks.TaskFactory"/>. May not be <c>null</c>.</param>
  781. <param name="action">The action delegate to execute. May not be <c>null</c>.</param>
  782. <returns>The started task.</returns>
  783. </member>
  784. <member name="T:Nito.AsyncEx.TaskHelper">
  785. <summary>
  786. Helper methods for working with tasks.
  787. </summary>
  788. </member>
  789. <member name="M:Nito.AsyncEx.TaskHelper.ExecuteAsTask(System.Action)">
  790. <summary>
  791. Executes a delegate synchronously, and captures its result in a task. The returned task is already completed.
  792. </summary>
  793. <param name="func">The delegate to execute synchronously.</param>
  794. </member>
  795. <member name="M:Nito.AsyncEx.TaskHelper.ExecuteAsTask``1(System.Func{``0})">
  796. <summary>
  797. Executes a delegate synchronously, and captures its result in a task. The returned task is already completed.
  798. </summary>
  799. <param name="func">The delegate to execute synchronously.</param>
  800. </member>
  801. <member name="M:ExceptionHelpers.PrepareForRethrow(System.Exception)">
  802. <summary>
  803. Attempts to prepare the exception for re-throwing by preserving the stack trace. The returned exception should be immediately thrown.
  804. </summary>
  805. <param name="exception">The exception. May not be <c>null</c>.</param>
  806. <returns>The <see cref="T:System.Exception"/> that was passed into this method.</returns>
  807. </member>
  808. </members>
  809. </doc>