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 |
---|---|---|
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. |
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The processed task. |
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The processed task. |
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 |
---|---|---|
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The processed task. |
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 |
---|---|---|
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The processed task. |
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The processed task. |
Type Parameters
Name | Description |
---|---|
T | The return type of the |
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The processed task. |
Type Parameters
Name | Description |
---|---|
T | The return type of the |
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 |
---|---|---|
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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The processed task. |
Type Parameters
Name | Description |
---|---|
T | The return type of the |