Пример #1
0
        BinderTester_A CreateBinderTestData()
        {
            BinderTester_A bta = new BinderTester_A();

            bta.x = 11;
            bta.y = "binder tester";
            return(bta);
        }
Пример #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;
        }
Пример #3
0
		BinderTester_A CreateBinderTestData ()
		{
			BinderTester_A bta = new BinderTester_A();
			bta.x = 11;
			bta.y = "binder tester";
			return bta;
		}