public override async Task <BlameFile> GetBlameAsync(BlameOptions options, IProgress <OperationProgress> progress, CancellationToken cancellationToken) { Verify.Argument.IsNotNull(options, nameof(options)); progress?.Report(new OperationProgress(Resources.StrsFetchingBlame.AddEllipsis())); var parameters = GetParameters(options); var result = await Repository .Accessor .QueryBlame .InvokeAsync(parameters, progress, cancellationToken); progress?.Report(OperationProgress.Completed); return(result); //return Repository // .Accessor // .QueryBlame // .InvokeAsync(parameters, progress, cancellationToken) // .ContinueWith( // t => // { // progress?.Report(OperationProgress.Completed); // return TaskUtility.UnwrapResult(t); // }, // cancellationToken, // TaskContinuationOptions.ExecuteSynchronously, // TaskScheduler.Default); }
private static BlameOptions GetDefault() { var options = new BlameOptions(); options.Freeze(); return(options); }
public override BlameFile GetBlame(BlameOptions options) { Verify.Argument.IsNotNull(options, nameof(options)); var parameters = GetParameters(options); return(Repository.Accessor.QueryBlame.Invoke(parameters)); }
private QueryBlameParameters GetParameters(BlameOptions options) { Assert.IsNotNull(options); var parameters = new QueryBlameParameters() { Revision = Revision.Pointer, FileName = FileName, }; return(parameters); }
public override Task <BlameFile> GetBlameAsync(BlameOptions options, IProgress <OperationProgress> progress, CancellationToken cancellationToken) { Verify.Argument.IsNotNull(options, "options"); if (progress != null) { progress.Report(new OperationProgress(Resources.StrsFetchingBlame.AddEllipsis())); } var parameters = GetParameters(options); return(Repository.Accessor.QueryBlame.InvokeAsync(parameters, progress, cancellationToken) .ContinueWith( t => { if (progress != null) { progress.Report(OperationProgress.Completed); } return TaskUtility.UnwrapResult(t); }, cancellationToken, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)); }
public abstract Task<BlameFile> GetBlameAsync(BlameOptions options, IProgress<OperationProgress> progress, CancellationToken cancellationToken);
public abstract BlameFile GetBlame(BlameOptions options);
public abstract Task <BlameFile> GetBlameAsync(BlameOptions options, IProgress <OperationProgress> progress, CancellationToken cancellationToken);
private static BlameOptions GetDefault() { var options = new BlameOptions(); options.Freeze(); return options; }
public override Task<BlameFile> GetBlameAsync(BlameOptions options, IProgress<OperationProgress> progress, CancellationToken cancellationToken) { Verify.Argument.IsNotNull(options, "options"); if(progress != null) { progress.Report(new OperationProgress(Resources.StrsFetchingBlame.AddEllipsis())); } var parameters = GetParameters(options); return Repository.Accessor.QueryBlame.InvokeAsync(parameters, progress, cancellationToken) .ContinueWith( t => { if(progress != null) { progress.Report(OperationProgress.Completed); } return TaskUtility.UnwrapResult(t); }, cancellationToken, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); }
public override BlameFile GetBlame(BlameOptions options) { Verify.Argument.IsNotNull(options, "options"); var parameters = GetParameters(options); return Repository.Accessor.QueryBlame.Invoke(parameters); }
private QueryBlameParameters GetParameters(BlameOptions options) { Assert.IsNotNull(options); var parameters = new QueryBlameParameters() { Revision = Revision.Pointer, FileName = FileName, }; return parameters; }