private object ShardStatsFromBinary(byte[] binary) { using (var stream = new MemoryStream(binary, false)) { var msg = ShardStats.ParseFrom(stream); return(new Shard.ShardStats(msg.Shard, msg.EntityCount)); } }
private ShardStats ShardStatsToProto(Shard.ShardStats o) { return(ShardStats.CreateBuilder().SetShard(o.ShardId).SetEntityCount(o.EntityCount).Build()); }