Beispiel #1
0
        public static void Serialize(Stream stream, object value)
        {
            var writer = new BinaryWriter(stream);
            var s      = new AltSerialization(writer);

            s.Serialize(value);
            s.Dispose();
        }
Beispiel #2
0
        public static object Deserialize(Stream stream)
        {
            var reader = new BinaryReader(stream);
            var s      = new AltSerialization(reader);
            var value  = s.Deserialize();

            s.Dispose();
            return(value);
        }