private static object Read(MemoryStream ms, Type tSource, MediaTypeFormatter formatter)
        {
            bool f = formatter.CanReadType(tSource);
            Assert.True(f);

            object o = formatter.ReadFromStreamAsync(tSource, ms, content: null, formatterLogger: null).Result;
            Assert.True(tSource.IsAssignableFrom(o.GetType()));

            return o;
        }