Interface IAsync
Defines methods for asynchron processing.
Namespace: Sartorius.SAF.Threading
Assembly: Sartorius.SAF.dll
Syntax
public interface IAsync
Methods
View SourceProcess(Action, Action)
Processes the given method asynchron.
Declaration
Task Process(Action method, Action callback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | method | The method to process asnc. |
| Action | callback | The callback method that is invoked when async processing is completed. |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Process(Action, Action, int, 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 |
|---|---|---|
| Action | method | The method to process asnc. |
| Action | callback | The callback method that is invoked when async processing is completed. |
| int | minimumProcessTimeInMilliseconds | The minimum time in milliseconds the asynchron processing should take. |
| Action<Exception> | exceptionCallback | The method that is invoked when an exception occurs. |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Process(Action, Action, int, IDisposable)
Processes the given method asynchron.
Declaration
Task Process(Action method, Action callback, int minimumProcessTimeInMilliseconds, IDisposable disposable = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | method | The method to process asnc. |
| Action | callback | The callback method that is invoked when async processing is completed. |
| int | minimumProcessTimeInMilliseconds | The minimum time in milliseconds the asynchron processing should take. |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Process(Action, Action, int, 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 |
|---|---|---|
| Action | method | The method to process asnc. |
| Action | callback | The callback method that is invoked when async processing is completed. |
| int | minimumProcessTimeInMilliseconds | The minimum time in milliseconds the asynchron processing should take. |
| TaskCreationOptions | taskCreationOptions | |
| Action<Exception> | exceptionCallback | The method that is invoked when an exception occurs. |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
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 |
|---|---|---|
| Action | method | The method to process asnc. |
| Action | callback | The callback method that is invoked when async processing is completed. |
| TaskCreationOptions | taskCreationOptions | |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Process(Action, int, IDisposable)
Processes the given method asynchron.
Declaration
Task Process(Action method, int minimumProcessTimeInMilliseconds, IDisposable disposable = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | method | The method to process asnc. |
| int | minimumProcessTimeInMilliseconds | The minimum time in milliseconds the asynchron processing should take. |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Process(Action, TaskCreationOptions, IDisposable)
Processes the given method asynchron.
Declaration
Task Process(Action method, TaskCreationOptions taskCreationOptions, IDisposable disposable = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | method | The method to process asnc. |
| TaskCreationOptions | taskCreationOptions | |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Process<T>(Func<T>, Action<T>, int, 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 |
|---|---|---|
| Func<T> | method | The method to process asnc. |
| Action<T> | callback | The callback method that is invoked when async processing is completed. |
| int | minimumProcessTimeInMilliseconds | The minimum time in milliseconds the asynchron processing should take. |
| Action<Exception> | exceptionCallback | The method that is invoked when an exception occurs. |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Type Parameters
| Name | Description |
|---|---|
| T | The return type of the |
Process<T>(Func<T>, Action<T>, int, 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 |
|---|---|---|
| Func<T> | method | The method to process asnc. |
| Action<T> | callback | The callback method that is invoked when async processing is completed. |
| int | minimumProcessTimeInMilliseconds | The minimum time in milliseconds the asynchron processing should take. |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Type Parameters
| Name | Description |
|---|---|
| T | The return type of the |
Process<T>(Func<T>, Action<T>, int, 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 |
|---|---|---|
| Func<T> | method | The method to process asnc. |
| Action<T> | callback | The callback method that is invoked when async processing is completed. |
| int | minimumProcessTimeInMilliseconds | The minimum time in milliseconds the asynchron processing should take. |
| TaskCreationOptions | taskCreationOptions | |
| Action<Exception> | exceptionCallback | The method that is invoked when an exception occurs. |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Type Parameters
| Name | Description |
|---|---|
| T | The return type of the |
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 |
|---|---|---|
| Func<T> | method | The method to process asnc. |
| Action<T> | callback | The callback method that is invoked when async processing is completed. |
| TaskCreationOptions | taskCreationOptions | |
| IDisposable | disposable | An implementation of IDisposable that is invoked after the |
Returns
| Type | Description |
|---|---|
| Task | The processed task. |
Type Parameters
| Name | Description |
|---|---|
| T | The return type of the |