src/NAsync/SimpleTaskFactory.cs
/// <summary>
/// Queues the specified work to run on the ThreadPool and returns a Task(TResult) handle for that work.
/// </summary>
/// <param name="function">The work to execute asynchronously</param>
/// <param name="cancellationToken">A cancellation token that should be used to cancel the work</param>
/// <returns>A Task(TResult) that represents the work queued to execute in the ThreadPool.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// The <paramref name="function"/> parameter was null.
/// </exception>
/// <exception cref="T:System.ObjectDisposedException">
/// The <see cref="T:System.CancellationTokenSource"/> associated with <paramref name="cancellationToken"/> was disposed.
/// </exception>
Queues the specified work to run on the ThreadPool and returns a Task(TResult) handle for that work.
Queues the specified work to run on the ThreadPool and returns a Task ( TResult ) handle for that work .
[NotNull]
        public static Task<T> Run<T>([NotNull] Func<T> function, CancellationToken cancellationToken)
        {
            return Task.Factory.StartNew(function, cancellationToken, TaskCreationOptions.None, TaskScheduler.Default);
        }
[ NotNull ] public static Task < T > Run < T > ( [ NotNull ] Func < T > function , CancellationToken cancellationToken ) { return Task . Factory . StartNew ( function , cancellationToken , TaskCreationOptions . None , TaskScheduler . Default ) ; }
Queues the specified work to run on the ThreadPool and returns a Task(TResult) handle for that work.
Queues the specified work to run on the ThreadPool and returns a Task ( TResult ) handle for that work .
A Task(TResult) that represents the work queued to execute in the ThreadPool.
A Task ( TResult ) that represents the work queued to execute in the ThreadPool .
The  parameter was null.
The parameter was null .
The  associated with  was disposed.
The associated with was disposed .
Func<T>
[NotNull]
cancellationToken
CancellationToken
A cancellation token that should be used to cancel the work
A cancellation token that should be used to cancel the work
function
The work to execute asynchronously
The work to execute asynchronously