Nito.AsyncEx.Context.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <?xml version="1.0"?>
  2. <doc>
  3. <assembly>
  4. <name>Nito.AsyncEx.Context</name>
  5. </assembly>
  6. <members>
  7. <member name="T:Nito.AsyncEx.AsyncContext">
  8. <summary>
  9. Provides a context for asynchronous operations. This class is threadsafe.
  10. </summary>
  11. <remarks>
  12. <para><see cref="M:Nito.AsyncEx.AsyncContext.Execute"/> may only be called once. After <see cref="M:Nito.AsyncEx.AsyncContext.Execute"/> returns, the async context should be disposed.</para>
  13. </remarks>
  14. </member>
  15. <member name="F:Nito.AsyncEx.AsyncContext._queue">
  16. <summary>
  17. The queue holding the actions to run.
  18. </summary>
  19. </member>
  20. <member name="F:Nito.AsyncEx.AsyncContext._synchronizationContext">
  21. <summary>
  22. The <see cref="P:Nito.AsyncEx.AsyncContext.SynchronizationContext"/> for this <see cref="T:Nito.AsyncEx.AsyncContext"/>.
  23. </summary>
  24. </member>
  25. <member name="F:Nito.AsyncEx.AsyncContext._taskScheduler">
  26. <summary>
  27. The <see cref="T:System.Threading.Tasks.TaskScheduler"/> for this <see cref="T:Nito.AsyncEx.AsyncContext"/>.
  28. </summary>
  29. </member>
  30. <member name="F:Nito.AsyncEx.AsyncContext._taskFactory">
  31. <summary>
  32. The <see cref="T:System.Threading.Tasks.TaskFactory"/> for this <see cref="T:Nito.AsyncEx.AsyncContext"/>.
  33. </summary>
  34. </member>
  35. <member name="F:Nito.AsyncEx.AsyncContext._outstandingOperations">
  36. <summary>
  37. The number of outstanding operations, including actions in the queue.
  38. </summary>
  39. </member>
  40. <member name="M:Nito.AsyncEx.AsyncContext.#ctor">
  41. <summary>
  42. Initializes a new instance of the <see cref="T:Nito.AsyncEx.AsyncContext"/> class. This is an advanced operation; most people should use one of the static <c>Run</c> methods instead.
  43. </summary>
  44. </member>
  45. <member name="P:Nito.AsyncEx.AsyncContext.Id">
  46. <summary>
  47. Gets a semi-unique identifier for this asynchronous context. This is the same identifier as the context's <see cref="T:System.Threading.Tasks.TaskScheduler"/>.
  48. </summary>
  49. </member>
  50. <member name="M:Nito.AsyncEx.AsyncContext.OperationStarted">
  51. <summary>
  52. Increments the outstanding asynchronous operation count.
  53. </summary>
  54. </member>
  55. <member name="M:Nito.AsyncEx.AsyncContext.OperationCompleted">
  56. <summary>
  57. Decrements the outstanding asynchronous operation count.
  58. </summary>
  59. </member>
  60. <member name="M:Nito.AsyncEx.AsyncContext.Enqueue(System.Threading.Tasks.Task,System.Boolean)">
  61. <summary>
  62. Queues a task for execution by <see cref="M:Nito.AsyncEx.AsyncContext.Execute"/>. If all tasks have been completed and the outstanding asynchronous operation count is zero, then this method has undefined behavior.
  63. </summary>
  64. <param name="task">The task to queue. May not be <c>null</c>.</param>
  65. <param name="propagateExceptions">A value indicating whether exceptions on this task should be propagated out of the main loop.</param>
  66. </member>
  67. <member name="M:Nito.AsyncEx.AsyncContext.Dispose">
  68. <summary>
  69. Disposes all resources used by this class. This method should NOT be called while <see cref="M:Nito.AsyncEx.AsyncContext.Execute"/> is executing.
  70. </summary>
  71. </member>
  72. <member name="M:Nito.AsyncEx.AsyncContext.Execute">
  73. <summary>
  74. Executes all queued actions. This method returns when all tasks have been completed and the outstanding asynchronous operation count is zero. This method will unwrap and propagate errors from tasks that are supposed to propagate errors.
  75. </summary>
  76. </member>
  77. <member name="M:Nito.AsyncEx.AsyncContext.Run(System.Action)">
  78. <summary>
  79. Queues a task for execution, and begins executing all tasks in the queue. This method returns when all tasks have been completed and the outstanding asynchronous operation count is zero. This method will unwrap and propagate errors from the task.
  80. </summary>
  81. <param name="action">The action to execute. May not be <c>null</c>.</param>
  82. </member>
  83. <member name="M:Nito.AsyncEx.AsyncContext.Run``1(System.Func{``0})">
  84. <summary>
  85. Queues a task for execution, and begins executing all tasks in the queue. This method returns when all tasks have been completed and the outstanding asynchronous operation count is zero. Returns the result of the task. This method will unwrap and propagate errors from the task.
  86. </summary>
  87. <typeparam name="TResult">The result type of the task.</typeparam>
  88. <param name="action">The action to execute. May not be <c>null</c>.</param>
  89. </member>
  90. <member name="M:Nito.AsyncEx.AsyncContext.Run(System.Func{System.Threading.Tasks.Task})">
  91. <summary>
  92. Queues a task for execution, and begins executing all tasks in the queue. This method returns when all tasks have been completed and the outstanding asynchronous operation count is zero. This method will unwrap and propagate errors from the task proxy.
  93. </summary>
  94. <param name="action">The action to execute. May not be <c>null</c>.</param>
  95. </member>
  96. <member name="M:Nito.AsyncEx.AsyncContext.Run``1(System.Func{System.Threading.Tasks.Task{``0}})">
  97. <summary>
  98. Queues a task for execution, and begins executing all tasks in the queue. This method returns when all tasks have been completed and the outstanding asynchronous operation count is zero. Returns the result of the task proxy. This method will unwrap and propagate errors from the task proxy.
  99. </summary>
  100. <typeparam name="TResult">The result type of the task.</typeparam>
  101. <param name="action">The action to execute. May not be <c>null</c>.</param>
  102. </member>
  103. <member name="P:Nito.AsyncEx.AsyncContext.Current">
  104. <summary>
  105. Gets the current <see cref="T:Nito.AsyncEx.AsyncContext"/> for this thread, or <c>null</c> if this thread is not currently running in an <see cref="T:Nito.AsyncEx.AsyncContext"/>.
  106. </summary>
  107. </member>
  108. <member name="P:Nito.AsyncEx.AsyncContext.SynchronizationContext">
  109. <summary>
  110. Gets the <see cref="P:Nito.AsyncEx.AsyncContext.SynchronizationContext"/> for this <see cref="T:Nito.AsyncEx.AsyncContext"/>. From inside <see cref="M:Nito.AsyncEx.AsyncContext.Execute"/>, this value is always equal to <see cref="P:System.Threading.SynchronizationContext.Current"/>.
  111. </summary>
  112. </member>
  113. <member name="P:Nito.AsyncEx.AsyncContext.Scheduler">
  114. <summary>
  115. Gets the <see cref="T:System.Threading.Tasks.TaskScheduler"/> for this <see cref="T:Nito.AsyncEx.AsyncContext"/>. From inside <see cref="M:Nito.AsyncEx.AsyncContext.Execute"/>, this value is always equal to <see cref="P:System.Threading.Tasks.TaskScheduler.Current"/>.
  116. </summary>
  117. </member>
  118. <member name="P:Nito.AsyncEx.AsyncContext.Factory">
  119. <summary>
  120. Gets the <see cref="T:System.Threading.Tasks.TaskFactory"/> for this <see cref="T:Nito.AsyncEx.AsyncContext"/>. Note that this factory has the <see cref="F:System.Threading.Tasks.TaskCreationOptions.HideScheduler"/> option set. Be careful with async delegates; you may need to call <see cref="M:System.Threading.SynchronizationContext.OperationStarted"/> and <see cref="M:System.Threading.SynchronizationContext.OperationCompleted"/> to prevent early termination of this <see cref="T:Nito.AsyncEx.AsyncContext"/>.
  121. </summary>
  122. </member>
  123. <member name="T:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext">
  124. <summary>
  125. The <see cref="P:Nito.AsyncEx.AsyncContext.SynchronizationContext"/> implementation used by <see cref="T:Nito.AsyncEx.AsyncContext"/>.
  126. </summary>
  127. </member>
  128. <member name="F:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext._context">
  129. <summary>
  130. The async context.
  131. </summary>
  132. </member>
  133. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.#ctor(Nito.AsyncEx.AsyncContext)">
  134. <summary>
  135. Initializes a new instance of the <see cref="T:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext"/> class.
  136. </summary>
  137. <param name="context">The async context.</param>
  138. </member>
  139. <member name="P:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.Context">
  140. <summary>
  141. Gets the async context.
  142. </summary>
  143. </member>
  144. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.Post(System.Threading.SendOrPostCallback,System.Object)">
  145. <summary>
  146. Dispatches an asynchronous message to the async context. If all tasks have been completed and the outstanding asynchronous operation count is zero, then this method has undefined behavior.
  147. </summary>
  148. <param name="d">The <see cref="T:System.Threading.SendOrPostCallback"/> delegate to call. May not be <c>null</c>.</param>
  149. <param name="state">The object passed to the delegate.</param>
  150. </member>
  151. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.Send(System.Threading.SendOrPostCallback,System.Object)">
  152. <summary>
  153. Dispatches an asynchronous message to the async context, and waits for it to complete.
  154. </summary>
  155. <param name="d">The <see cref="T:System.Threading.SendOrPostCallback"/> delegate to call. May not be <c>null</c>.</param>
  156. <param name="state">The object passed to the delegate.</param>
  157. </member>
  158. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.OperationStarted">
  159. <summary>
  160. Responds to the notification that an operation has started by incrementing the outstanding asynchronous operation count.
  161. </summary>
  162. </member>
  163. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.OperationCompleted">
  164. <summary>
  165. Responds to the notification that an operation has completed by decrementing the outstanding asynchronous operation count.
  166. </summary>
  167. </member>
  168. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.CreateCopy">
  169. <summary>
  170. Creates a copy of the synchronization context.
  171. </summary>
  172. <returns>A new <see cref="T:System.Threading.SynchronizationContext"/> object.</returns>
  173. </member>
  174. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.GetHashCode">
  175. <summary>
  176. Returns a hash code for this instance.
  177. </summary>
  178. <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
  179. </member>
  180. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextSynchronizationContext.Equals(System.Object)">
  181. <summary>
  182. Determines whether the specified <see cref="T:System.Object"/> is equal to this instance. It is considered equal if it refers to the same underlying async context as this instance.
  183. </summary>
  184. <param name="obj">The <see cref="T:System.Object"/> to compare with this instance.</param>
  185. <returns><c>true</c> if the specified <see cref="T:System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns>
  186. </member>
  187. <member name="T:Nito.AsyncEx.AsyncContext.TaskQueue">
  188. <summary>
  189. A blocking queue.
  190. </summary>
  191. </member>
  192. <member name="F:Nito.AsyncEx.AsyncContext.TaskQueue._queue">
  193. <summary>
  194. The underlying blocking collection.
  195. </summary>
  196. </member>
  197. <member name="M:Nito.AsyncEx.AsyncContext.TaskQueue.#ctor">
  198. <summary>
  199. Initializes a new instance of the <see cref="T:Nito.AsyncEx.AsyncContext.TaskQueue"/> class.
  200. </summary>
  201. </member>
  202. <member name="M:Nito.AsyncEx.AsyncContext.TaskQueue.GetConsumingEnumerable">
  203. <summary>
  204. Gets a blocking enumerable that removes items from the queue. This enumerable only completes after <see cref="M:Nito.AsyncEx.AsyncContext.TaskQueue.CompleteAdding"/> has been called.
  205. </summary>
  206. <returns>A blocking enumerable that removes items from the queue.</returns>
  207. </member>
  208. <member name="M:Nito.AsyncEx.AsyncContext.TaskQueue.GetScheduledTasks">
  209. <summary>
  210. Generates an enumerable of <see cref="T:System.Threading.Tasks.Task"/> instances currently queued to the scheduler waiting to be executed.
  211. </summary>
  212. <returns>An enumerable that allows traversal of tasks currently queued to this scheduler.</returns>
  213. </member>
  214. <member name="M:Nito.AsyncEx.AsyncContext.TaskQueue.TryAdd(System.Threading.Tasks.Task,System.Boolean)">
  215. <summary>
  216. Attempts to add the item to the queue. If the queue has been marked as complete for adding, this method returns <c>false</c>.
  217. </summary>
  218. <param name="item">The item to enqueue.</param>
  219. <param name="propagateExceptions">A value indicating whether exceptions on this task should be propagated out of the main loop.</param>
  220. </member>
  221. <member name="M:Nito.AsyncEx.AsyncContext.TaskQueue.CompleteAdding">
  222. <summary>
  223. Marks the queue as complete for adding, allowing the enumerator returned from <see cref="M:Nito.AsyncEx.AsyncContext.TaskQueue.GetConsumingEnumerable"/> to eventually complete. This method may be called several times.
  224. </summary>
  225. </member>
  226. <member name="M:Nito.AsyncEx.AsyncContext.TaskQueue.Dispose">
  227. <summary>
  228. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
  229. </summary>
  230. </member>
  231. <member name="T:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler">
  232. <summary>
  233. A task scheduler which schedules tasks to an async context.
  234. </summary>
  235. </member>
  236. <member name="F:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler._context">
  237. <summary>
  238. The async context for this task scheduler.
  239. </summary>
  240. </member>
  241. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler.#ctor(Nito.AsyncEx.AsyncContext)">
  242. <summary>
  243. Initializes a new instance of the <see cref="T:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler"/> class.
  244. </summary>
  245. <param name="context">The async context for this task scheduler. May not be <c>null</c>.</param>
  246. </member>
  247. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler.GetScheduledTasks">
  248. <summary>
  249. Generates an enumerable of <see cref="T:System.Threading.Tasks.Task"/> instances currently queued to the scheduler waiting to be executed.
  250. </summary>
  251. <returns>An enumerable that allows traversal of tasks currently queued to this scheduler.</returns>
  252. </member>
  253. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler.QueueTask(System.Threading.Tasks.Task)">
  254. <summary>
  255. Queues a <see cref="T:System.Threading.Tasks.Task"/> to the scheduler. If all tasks have been completed and the outstanding asynchronous operation count is zero, then this method has undefined behavior.
  256. </summary>
  257. <param name="task">The <see cref="T:System.Threading.Tasks.Task"/> to be queued.</param>
  258. </member>
  259. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task,System.Boolean)">
  260. <summary>
  261. Determines whether the provided <see cref="T:System.Threading.Tasks.Task"/> can be executed synchronously in this call, and if it can, executes it.
  262. </summary>
  263. <param name="task">The <see cref="T:System.Threading.Tasks.Task"/> to be executed.</param>
  264. <param name="taskWasPreviouslyQueued">A Boolean denoting whether or not task has previously been queued. If this parameter is True, then the task may have been previously queued (scheduled); if False, then the task is known not to have been queued, and this call is being made in order to execute the task inline without queuing it.</param>
  265. <returns>A Boolean value indicating whether the task was executed inline.</returns>
  266. <exception cref="T:System.InvalidOperationException">The <paramref name="task"/> was already executed.</exception>
  267. </member>
  268. <member name="P:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler.MaximumConcurrencyLevel">
  269. <summary>
  270. Indicates the maximum concurrency level this <see cref="T:System.Threading.Tasks.TaskScheduler"/> is able to support.
  271. </summary>
  272. </member>
  273. <member name="M:Nito.AsyncEx.AsyncContext.AsyncContextTaskScheduler.DoTryExecuteTask(System.Threading.Tasks.Task)">
  274. <summary>
  275. Exposes the base <see cref="M:System.Threading.Tasks.TaskScheduler.TryExecuteTask(System.Threading.Tasks.Task)"/> method.
  276. </summary>
  277. <param name="task">The task to attempt to execute.</param>
  278. </member>
  279. <member name="T:Nito.AsyncEx.AsyncContextThread">
  280. <summary>
  281. A thread that executes actions within an <see cref="T:Nito.AsyncEx.AsyncContext"/>.
  282. </summary>
  283. </member>
  284. <member name="F:Nito.AsyncEx.AsyncContextThread._thread">
  285. <summary>
  286. The child thread.
  287. </summary>
  288. </member>
  289. <member name="M:Nito.AsyncEx.AsyncContextThread.CreateAsyncContext">
  290. <summary>
  291. Creates a new <see cref="T:Nito.AsyncEx.AsyncContext"/> and increments its operation count.
  292. </summary>
  293. </member>
  294. <member name="M:Nito.AsyncEx.AsyncContextThread.#ctor(Nito.AsyncEx.AsyncContext)">
  295. <summary>
  296. Initializes a new instance of the <see cref="T:Nito.AsyncEx.AsyncContextThread"/> class, creating a child thread waiting for commands.
  297. </summary>
  298. <param name="context">The context for this thread.</param>
  299. </member>
  300. <member name="M:Nito.AsyncEx.AsyncContextThread.#ctor">
  301. <summary>
  302. Initializes a new instance of the <see cref="T:Nito.AsyncEx.AsyncContextThread"/> class, creating a child thread waiting for commands.
  303. </summary>
  304. </member>
  305. <member name="P:Nito.AsyncEx.AsyncContextThread.Context">
  306. <summary>
  307. Gets the <see cref="T:Nito.AsyncEx.AsyncContext"/> executed by this thread.
  308. </summary>
  309. </member>
  310. <member name="M:Nito.AsyncEx.AsyncContextThread.AllowThreadToExit">
  311. <summary>
  312. Permits the thread to exit, if we have not already done so.
  313. </summary>
  314. </member>
  315. <member name="M:Nito.AsyncEx.AsyncContextThread.JoinAsync">
  316. <summary>
  317. Requests the thread to exit and returns a task representing the exit of the thread. The thread will exit when all outstanding asynchronous operations complete.
  318. </summary>
  319. </member>
  320. <member name="M:Nito.AsyncEx.AsyncContextThread.Join">
  321. <summary>
  322. Requests the thread to exit and blocks until the thread exits. The thread will exit when all outstanding asynchronous operations complete.
  323. </summary>
  324. </member>
  325. <member name="M:Nito.AsyncEx.AsyncContextThread.Dispose(Nito.AsyncEx.AsyncContext)">
  326. <summary>
  327. Requests the thread to exit.
  328. </summary>
  329. </member>
  330. <member name="P:Nito.AsyncEx.AsyncContextThread.Factory">
  331. <summary>
  332. Gets the <see cref="T:System.Threading.Tasks.TaskFactory"/> for this thread, which can be used to schedule work to this thread.
  333. </summary>
  334. </member>
  335. </members>
  336. </doc>