Fork me on GitHub
Show / Hide Table of Contents

Interface IDispatcher

Dispatcher executes an action or a function on its own context
Namespace: ComposableAsync
Assembly: ComposableAsync.Core.dll
Syntax
public interface IDispatcher

Methods

| Improve this Doc View Source

Clone()

Clone dispatcher
Declaration
IDispatcher Clone()
Returns
Type Description
IDispatcher
| Improve this Doc View Source

Dispatch(Action)

Execute action on dispatcher context in a none-blocking way
Declaration
void Dispatch(Action action)
Parameters
Type Name Description
System.Action action
| Improve this Doc View Source

Enqueue(Action)

Enqueue the action and return a task corresponding to the completion of the action
Declaration
Task Enqueue(Action action)
Parameters
Type Name Description
System.Action action
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

Enqueue(Action, CancellationToken)

Enqueue the action and return a task corresponding to the execution of the task
Declaration
Task Enqueue(Action action, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Action action
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

Enqueue(Func<Task>)

Enqueue the task and return a task corresponding to the completion of the task
Declaration
Task Enqueue(Func<Task> action)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task> action
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

Enqueue(Func<Task>, CancellationToken)

Enqueue the task and return a task corresponding to the execution of the task
Declaration
Task Enqueue(Func<Task> action, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task> action
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

Enqueue<T>(Func<T>)

Enqueue the function and return a task corresponding to the result of the function
Declaration
Task<T> Enqueue<T>(Func<T> action)
Parameters
Type Name Description
System.Func<T> action
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Enqueue<T>(Func<T>, CancellationToken)

Enqueue the function and return a task corresponding to the execution of the task ///
Declaration
Task<T> Enqueue<T>(Func<T> action, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Func<T> action
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Enqueue<T>(Func<Task<T>>)

Enqueue the task and return a task corresponding to the execution of the original task
Declaration
Task<T> Enqueue<T>(Func<Task<T>> action)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task<T>> action
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

Enqueue<T>(Func<Task<T>>, CancellationToken)

Enqueue the task and return a task corresponding to the execution of the original task
Declaration
Task<T> Enqueue<T>(Func<Task<T>> action, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task<T>> action
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T

Extension Methods

DispatcherExtension.GetAwaiter(IDispatcher)
DispatcherExtension.Then(IDispatcher, IDispatcher)
DispatcherExtension.Then(IDispatcher, IDispatcher[])
DispatcherExtension.Then(IDispatcher, IEnumerable<IDispatcher>)
DispatcherExtension.AsDelegatingHandler(IDispatcher)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX