Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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));
 }