/// <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)); }
public override async Task <LogReply> PostLog(LogDto request, ServerCallContext context) { await logBatchService.Process(request); var result = new LogReply() { Success = true }; return(result); }