Пример #1
0
        public static CharBlockArray Open(Stream @in)
        {
#if NETSTANDARD
            var contents = new byte[@in.Length];
            @in.Read(contents, 0, (int)@in.Length);

            var json         = Encoding.UTF8.GetString(contents);
            var deserialized = JsonConvert.DeserializeObject <CharBlockArray>(json);

            return(deserialized);
#else
            return(StreamUtils.DeserializeFromStream(@in) as CharBlockArray);
#endif
        }
Пример #2
0
 public static CharBlockArray Open(BinaryReader @in)
 {
     return(StreamUtils.DeserializeFromStream(@in) as CharBlockArray);
 }