CallerContextServiceSpawnTaskTResult Method |
Creates an asynchronous task which inherits the properties of the current caller context.
Namespace:
Dundas.BI.Services
Assembly:
Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax public Task<TResult> SpawnTask<TResult>(
string name,
Func<TResult> func,
GroupCancellationToken? cancellationToken
)
Public Function SpawnTask(Of TResult) (
name As String,
func As Func(Of TResult),
cancellationToken As GroupCancellationToken
) As Task(Of TResult)
public:
generic<typename TResult>
virtual Task<TResult>^ SpawnTask(
String^ name,
Func<TResult>^ func,
GroupCancellationToken^ cancellationToken
) sealed
abstract SpawnTask :
name : string *
func : Func<'TResult> *
cancellationToken : GroupCancellationToken -> Task<'TResult>
override SpawnTask :
name : string *
func : Func<'TResult> *
cancellationToken : GroupCancellationToken -> Task<'TResult>
Parameters
- name
- Type: SystemString
A name which will be assigned to the spawned operation (used for diagnostic purposes). - func
- Type: SystemFuncTResult
The function to invoke asynchronously. - cancellationToken
- Type: Dundas.BI.Data.DataRetrievalGroupCancellationToken
The cancellation token.
Type Parameters
- TResult
- The type of object returned by the task.
Return Value
Type:
TaskTResultA task object representing the asynchronous operation.
Implements
ICallerContextServiceSpawnTaskTResult(String, FuncTResult, GroupCancellationToken)Exceptions See Also