Esempio n. 1
0
        public void Deserialize(System.IO.Stream s)
        {
            int length = s.ReadInt32().Swap();

            Value = new byte[length];
            s.Read(Value, 0, length);
        }
        public void Deserialize(System.IO.Stream s)
        {
            int length = s.ReadInt32().Swap();

            byte[] utf8Bytes = new byte[length];
            s.Read(utf8Bytes, 0, length);
            Value = UTF8.GetString(utf8Bytes);
        }
        public void Deserialize(System.IO.Stream s)
        {
            int itemCount = s.ReadInt32().Swap();

            for (int i = 0; i < itemCount; i++)
            {
                IHydraItem item = HydraItemDeserializer.Deserialize(s);
                Items.Add(item);
            }
        }
        public void Deserialize(System.IO.Stream s)
        {
            int itemCount = s.ReadInt32().Swap();

            for (int i = 0; i < itemCount; i++)
            {
                IHydraItem key = HydraItemDeserializer.Deserialize(s);
                if (!(key is HydraUtf8String))
                {
                    throw new NotImplementedException();
                }
                HydraUtf8String stringKey = key as HydraUtf8String;

                IHydraItem value = HydraItemDeserializer.Deserialize(s);

                Items.Add(stringKey.Value, value);
            }
        }
Esempio n. 5
0
 public void Deserialize(System.IO.Stream s)
 {
     Value = s.ReadInt32().Swap();
 }