public static void Serialize <T>(T data, MemoryStream stream, [NotNull] MsgPackContext context)
 {
     using (var writer = new MsgPackMemoryStreamWriter(stream, false))
     {
         var converter = GetConverter <T>(context);
         converter.Write(data, writer);
     }
 }
        public static byte[] Serialize <T>(T data, [NotNull] MsgPackContext context)
        {
            var memoryStream = new MemoryStream();

            using (var writer = new MsgPackMemoryStreamWriter(memoryStream))
            {
                var converter = GetConverter <T>(context);
                converter.Write(data, writer);
                return(memoryStream.ToArray());
            }
        }