Exemplo n.º 1
0
        BinderTester_A CreateBinderTestData()
        {
            BinderTester_A bta = new BinderTester_A();

            bta.x = 11;
            bta.y = "binder tester";
            return(bta);
        }
Exemplo n.º 2
0
        void WriteData()
        {
            StreamingContext  context = new StreamingContext(StreamingContextStates.Other);
            SurrogateSelector sel     = new SurrogateSelector();

            sel.AddSurrogate(typeof(Point), context, new PointSurrogate());

            List           list = CreateTestData();
            BinderTester_A bta  = CreateBinderTestData();

            ms = new MemoryStream();
            SoapFormatter f = new SoapFormatter(sel, new StreamingContext(StreamingContextStates.Other));

            f.Serialize(ms, list);
//			ProcessMessages (ms, null);
//			f.Serialize (ms, bta);
            ms.Flush();
            ms.Position = 0;
            StreamReader reader = new StreamReader(ms);

            Console.WriteLine(reader.ReadToEnd());
            ms.Position = 0;
        }
Exemplo n.º 3
0
		BinderTester_A CreateBinderTestData ()
		{
			BinderTester_A bta = new BinderTester_A();
			bta.x = 11;
			bta.y = "binder tester";
			return bta;
		}