Exemplo n.º 1
0
        /// <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();
            }));
        }
Exemplo n.º 2
0
 /// <nodoc />
 public static GetContentHashListResult FromGrpc(this GetContentHashListResponse input)
 {
     Contract.Assert(input.Header.Succeeded);
     return(new GetContentHashListResult(FromGrpc(input.HashList)));
 }