Show / Hide Table of Contents

Interface IAsync

Defines methods for asynchron processing.

Namespace: Sartorius.SAF.Threading
Assembly: Sartorius.SAF.dll
Syntax
public interface IAsync

Methods

View Source

Process(Action, Action)

Processes the given method asynchron.

Declaration
Task Process(Action method, Action callback = null)
Parameters
Type Name Description
System.Action method

The method to process asnc.

System.Action callback

The callback method that is invoked when async processing is completed.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

View Source

Process(Action, Action, Int32, Action<Exception>, IDisposable)

Processes the given method asynchron.

Declaration
Task Process(Action method, Action callback, int minimumProcessTimeInMilliseconds, Action<Exception> exceptionCallback, IDisposable disposable = null)
Parameters
Type Name Description
System.Action method

The method to process asnc.

System.Action callback

The callback method that is invoked when async processing is completed.

System.Int32 minimumProcessTimeInMilliseconds

The minimum time in milliseconds the asynchron processing should take.

System.Action<System.Exception> exceptionCallback

The method that is invoked when an exception occurs.

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

View Source

Process(Action, Action, Int32, IDisposable)

Processes the given method asynchron.

Declaration
Task Process(Action method, Action callback, int minimumProcessTimeInMilliseconds, IDisposable disposable = null)
Parameters
Type Name Description
System.Action method

The method to process asnc.

System.Action callback

The callback method that is invoked when async processing is completed.

System.Int32 minimumProcessTimeInMilliseconds

The minimum time in milliseconds the asynchron processing should take.

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

View Source

Process(Action, Action, Int32, TaskCreationOptions, Action<Exception>, IDisposable)

Processes the given method asynchron.

Declaration
Task Process(Action method, Action callback, int minimumProcessTimeInMilliseconds, TaskCreationOptions taskCreationOptions, Action<Exception> exceptionCallback, IDisposable disposable = null)
Parameters
Type Name Description
System.Action method

The method to process asnc.

System.Action callback

The callback method that is invoked when async processing is completed.

System.Int32 minimumProcessTimeInMilliseconds

The minimum time in milliseconds the asynchron processing should take.

System.Threading.Tasks.TaskCreationOptions taskCreationOptions

The System.Threading.Tasks.TaskCreationOptions

System.Action<System.Exception> exceptionCallback

The method that is invoked when an exception occurs.

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

View Source

Process(Action, Action, TaskCreationOptions, IDisposable)

Processes the given method asynchron.

Declaration
Task Process(Action method, Action callback, TaskCreationOptions taskCreationOptions, IDisposable disposable = null)
Parameters
Type Name Description
System.Action method

The method to process asnc.

System.Action callback

The callback method that is invoked when async processing is completed.

System.Threading.Tasks.TaskCreationOptions taskCreationOptions

The System.Threading.Tasks.TaskCreationOptions

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

View Source

Process(Action, Int32, IDisposable)

Processes the given method asynchron.

Declaration
Task Process(Action method, int minimumProcessTimeInMilliseconds, IDisposable disposable = null)
Parameters
Type Name Description
System.Action method

The method to process asnc.

System.Int32 minimumProcessTimeInMilliseconds

The minimum time in milliseconds the asynchron processing should take.

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

View Source

Process(Action, TaskCreationOptions, IDisposable)

Processes the given method asynchron.

Declaration
Task Process(Action method, TaskCreationOptions taskCreationOptions, IDisposable disposable = null)
Parameters
Type Name Description
System.Action method

The method to process asnc.

System.Threading.Tasks.TaskCreationOptions taskCreationOptions

The System.Threading.Tasks.TaskCreationOptions

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

View Source

Process<T>(Func<T>, Action<T>, Int32, Action<Exception>, IDisposable)

Processes the given method asynchron.

Declaration
Task Process<T>(Func<T> method, Action<T> callback, int minimumProcessTimeInMilliseconds, Action<Exception> exceptionCallback, IDisposable disposable = null)
Parameters
Type Name Description
System.Func<T> method

The method to process asnc.

System.Action<T> callback

The callback method that is invoked when async processing is completed.

System.Int32 minimumProcessTimeInMilliseconds

The minimum time in milliseconds the asynchron processing should take.

System.Action<System.Exception> exceptionCallback

The method that is invoked when an exception occurs.

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

Type Parameters
Name Description
T

The return type of the method.

View Source

Process<T>(Func<T>, Action<T>, Int32, IDisposable)

Processes the given method asynchron.

Declaration
Task Process<T>(Func<T> method, Action<T> callback, int minimumProcessTimeInMilliseconds = 0, IDisposable disposable = null)
Parameters
Type Name Description
System.Func<T> method

The method to process asnc.

System.Action<T> callback

The callback method that is invoked when async processing is completed.

System.Int32 minimumProcessTimeInMilliseconds

The minimum time in milliseconds the asynchron processing should take.

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

Type Parameters
Name Description
T

The return type of the method.

View Source

Process<T>(Func<T>, Action<T>, Int32, TaskCreationOptions, Action<Exception>, IDisposable)

Processes the given method asynchron.

Declaration
Task Process<T>(Func<T> method, Action<T> callback, int minimumProcessTimeInMilliseconds, TaskCreationOptions taskCreationOptions, Action<Exception> exceptionCallback, IDisposable disposable = null)
Parameters
Type Name Description
System.Func<T> method

The method to process asnc.

System.Action<T> callback

The callback method that is invoked when async processing is completed.

System.Int32 minimumProcessTimeInMilliseconds

The minimum time in milliseconds the asynchron processing should take.

System.Threading.Tasks.TaskCreationOptions taskCreationOptions

The System.Threading.Tasks.TaskCreationOptions

System.Action<System.Exception> exceptionCallback

The method that is invoked when an exception occurs.

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

Type Parameters
Name Description
T

The return type of the method.

View Source

Process<T>(Func<T>, Action<T>, TaskCreationOptions, IDisposable)

Processes the given method asynchron.

Declaration
Task Process<T>(Func<T> method, Action<T> callback, TaskCreationOptions taskCreationOptions, IDisposable disposable = null)
Parameters
Type Name Description
System.Func<T> method

The method to process asnc.

System.Action<T> callback

The callback method that is invoked when async processing is completed.

System.Threading.Tasks.TaskCreationOptions taskCreationOptions

The System.Threading.Tasks.TaskCreationOptions

System.IDisposable disposable

An implementation of System.IDisposable that is invoked after the method is invoked, or when an exception occurs.

Returns
Type Description
System.Threading.Tasks.Task

The processed task.

Type Parameters
Name Description
T

The return type of the method.

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX