public static void StartChildOperationAsync <TOperation>( this IOperationContext context, string name, double progressShare = 0, bool shareCancellation = true) where TOperation : IAsyncOperation, new() { context.StartChildOperationAsync(name, new TOperation(), progressShare, shareCancellation); }
public static Task <TResult> StartChildOperationAsync <TOperation, TResult>( this IOperationContext context, string name, double progressShare = 0, bool shareCancellation = true) where TOperation : IAsyncOperation <TResult>, new() { return(context.StartChildOperationAsync(name, new TOperation(), progressShare, shareCancellation)); }
public static Task <TResult> StartChildOperationAsync <TResult>( this IOperationContext context, string name, IAsyncOperation <TResult> operation, double progressShare = 0, bool shareCancellation = true) { return(context.StartChildOperationAsync(name, operation.ExecuteAsync, progressShare, shareCancellation)); }