Exemplo n.º 1
0
 /// <summary>
 /// 序列化
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 private static ByteString GetByteString(LogReply item)
 {
     using (var ms = new MemoryStream())
     {
         item.WriteTo(ms);
         return(ByteString.CopyFrom(ms.ToArray()));
     }
 }
        public override Task <LogReply> PostLog(LogDto request, ServerCallContext context)
        {
            logBatchService.Process(request);
            var result = new LogReply()
            {
                Success = true
            };

            return(Task.FromResult(result));
        }
Exemplo n.º 3
0
        public override async Task <LogReply> PostLog(LogDto request, ServerCallContext context)
        {
            await logBatchService.Process(request);

            var result = new LogReply()
            {
                Success = true
            };

            return(result);
        }