Ejemplo n.º 1
0
        private static void serializeAndOutput(Object world)
        {
            var output      = new MemoryStream();
            var poSerialize = new POSerializer();

            poSerialize.Serialize(world);
            throw new NotImplementedException();

            Console.WriteLine(Encoding.Default.GetString(output.ToArray()));
        }
Ejemplo n.º 2
0
        public void TestDeserialize()
        {
            var serializer = new POSerializer();
            var s          = serializer.Serialize(SimplePO.Default());

            serializer = new POSerializer();

            var deserialized = serializer.Deserialize(s);

            Console.WriteLine(deserialized[0].ToString());
            Assert.AreEqual(SimplePO.Default(), deserialized[0]);
        }
Ejemplo n.º 3
0
        public void TestSerializeToXml()
        {
            var serializer = new POSerializer();
            var s          = serializer.Serialize(SimplePO.Default());
            var xSer       = new XmlSerializer(typeof(SerializationResult));

            using (var memStrm = new MemoryStream())
            {
                xSer.Serialize(memStrm, s);
                Console.WriteLine(Encoding.Default.GetString(memStrm.ToArray()));
            }
        }
Ejemplo n.º 4
0
 public void TestSerialize()
 {
     var serializer = new POSerializer();
     var s          = serializer.Serialize(SimplePO.Default());
 }