object[][] ProcessMessages(Stream stream, IMessage[] messages)
        {
            object[][] results = new object[9][];

            AuxProxy     prx = new AuxProxy(stream, uri);
            MethodTester mt  = (MethodTester)prx.GetTransparentProxy();
            object       res;

            if (messages != null)
            {
                prx.SetTestMessage(messages[0]);
            }
            res        = mt.OverloadedMethod();
            results[0] = new object[] { res };

            if (messages != null)
            {
                prx.SetTestMessage(messages[1]);
            }
            res        = mt.OverloadedMethod(22);
            results[1] = new object[] { res };

            if (messages != null)
            {
                prx.SetTestMessage(messages[2]);
            }
            int[] par1 = new int[] { 1, 2, 3 };
            res        = mt.OverloadedMethod(par1);
            results[2] = new object[] { res, par1 };

            if (messages != null)
            {
                prx.SetTestMessage(messages[3]);
            }
            mt.NoReturn();

            if (messages != null)
            {
                prx.SetTestMessage(messages[4]);
            }
            res        = mt.Simple("hello", 44);
            results[4] = new object[] { res };

            if (messages != null)
            {
                prx.SetTestMessage(messages[5]);
            }
            res        = mt.Simple2('F');
            results[5] = new object[] { res };

            if (messages != null)
            {
                prx.SetTestMessage(messages[6]);
            }
            char[] par2 = new char[] { 'G' };
            res        = mt.Simple3(par2);
            results[6] = new object[] { res, par2 };

            if (messages != null)
            {
                prx.SetTestMessage(messages[7]);
            }
            res        = mt.Simple3(null);
            results[7] = new object[] { res };

            if (messages != null)
            {
                prx.SetTestMessage(messages[8]);
            }

            SimpleClass b = new SimpleClass('H');

            res        = mt.SomeMethod(123456, b);
            results[8] = new object[] { res, b };

            return(results);
        }
Exemplo n.º 2
0
		object[][] ProcessMessages (Stream stream, IMessage[] messages)
		{
			object[][] results = new object[9][];

			AuxProxy prx = new AuxProxy (stream, uri);
			MethodTester mt = (MethodTester)prx.GetTransparentProxy();
			object res;

			if (messages != null) prx.SetTestMessage (messages[0]);
			res = mt.OverloadedMethod();
			results[0] = new object[] {res};

			if (messages != null) prx.SetTestMessage (messages[1]);
			res = mt.OverloadedMethod(22);
			results[1] = new object[] {res};

			if (messages != null) prx.SetTestMessage (messages[2]);
			int[] par1 = new int[] {1,2,3};
			res = mt.OverloadedMethod(par1);
			results[2] = new object[] { res, par1 };

			if (messages != null) prx.SetTestMessage (messages[3]);
			mt.NoReturn();

			if (messages != null) prx.SetTestMessage (messages[4]);
			res = mt.Simple ("hello",44);
			results[4] = new object[] { res };

			if (messages != null) prx.SetTestMessage (messages[5]);
			res = mt.Simple2 ('F');
			results[5] = new object[] { res };

			if (messages != null) prx.SetTestMessage (messages[6]);
			char[] par2 = new char[] { 'G' };
			res = mt.Simple3 (par2);
			results[6] = new object[] { res, par2 };

			if (messages != null) prx.SetTestMessage (messages[7]);
			res = mt.Simple3 (null);
			results[7] = new object[] { res };

			if (messages != null) prx.SetTestMessage (messages[8]);

			SimpleClass b = new SimpleClass ('H');
			res = mt.SomeMethod (123456, b);
			results[8] = new object[] { res, b };

			return results;
		}