public static TResult StartChildOperation <TOperation, TResult>( this IOperationContext context, string name, double progressShare = 0, bool shareCancellation = true) where TOperation : IOperation <TResult>, new() { return(context.StartChildOperation(name, new TOperation(), progressShare, shareCancellation)); }
public static void StartChildOperation <TOperation>( this IOperationContext context, string name, double progressShare = 0, bool shareCancellation = true) where TOperation : IOperation, new() { context.StartChildOperation(name, new TOperation(), progressShare, shareCancellation); }
public static TResult StartChildOperation <TResult>( this IOperationContext context, string name, IOperation <TResult> operation, double progressShare = 0, bool shareCancellation = true) { return(context.StartChildOperation(name, operation.Execute, progressShare, shareCancellation)); }
public static void StartChildOperation( this IOperationContext context, string name, IOperation operation, double progressShare = 0, bool shareCancellation = true) { context.StartChildOperation(name, operation.Execute, progressShare, shareCancellation); }
public static async Task StartChildOperationAsync( this IOperationContext context, string name, Func <IOperationContext, Task> operation, double progressShare = 0, bool shareCancellation = true) { using (var childContext = context.StartChildOperation(name, progressShare, shareCancellation)) { await operation(childContext); } }
public static TResult StartChildOperation <TResult>( this IOperationContext context, string name, Func <IOperationContext, TResult> operation, double progressShare = 0, bool shareCancellation = true) { using (var childContext = context.StartChildOperation(name, progressShare, shareCancellation)) { return(operation(childContext)); } }
public static void StartChildOperation( this IOperationContext context, string name, Action <IOperationContext> operation, double progressShare = 0, bool shareCancellation = true) { using (var childContext = context.StartChildOperation(name, progressShare, shareCancellation)) { operation(childContext); } }