public Task <GetContentHashListResponse> GetContentHashListAsync(GetContentHashListRequest request, CallContext callContext = default) { return(ExecuteAsync(request, callContext, context => { return _store.GetContentHashListAsync(context, request.StrongFingerprint) .SelectAsync(r => new GetContentHashListResponse() { MetadataEntry = r.Value }); })); }
private Task <GetContentHashListResponse> GetContentHashListAsync(GetContentHashListRequest request, ServerCallContext context) { return(PerformOperationAsync( request, async c => { StrongFingerprint fingerprint = request.Fingerprint.FromGrpc(); var result = await c.Session.GetContentHashListAsync(c.Context, fingerprint, c.Context.Token).ThrowIfFailure(); return new GetContentHashListResponse() { HashList = result.ContentHashListWithDeterminism.ToGrpc(), }; }, context.CancellationToken)); }
/// <summary> /// Get content hash list for strong fingerprint /// </summary> public Task <GetContentHashListResult> GetContentHashListAsync(OperationContext context, StrongFingerprint strongFingerprint) { return(PerformOperationAsync( context, async sessionContext => { var request = new GetContentHashListRequest() { Header = sessionContext.CreateHeader(), Fingerprint = strongFingerprint.ToGrpc(), }; GetContentHashListResponse response = await SendGrpcRequestAndThrowIfFailedAsync( sessionContext, async() => await Client.GetContentHashListAsync(request)); return response.FromGrpc(); })); }
/// <inheritdoc /> public override Task <GetContentHashListResponse> GetContentHashList(GetContentHashListRequest request, ServerCallContext context) => _server.GetContentHashListAsync(request, context);