Esempio n. 1
0
        private void CallStructParamsMethod(TestService serviceToUse)
        {
            TestStructA arg = new TestStructAImpl();

            arg.X = m_random.Next(100);
            arg.Y = -1 * m_random.Next(100);
            TestStructA result = m_testService1.TestEchoStruct(arg);

            Assertion.AssertEquals(arg.X, result.X);
            Assertion.AssertEquals(arg.Y, result.Y);
        }
Esempio n. 2
0
        private void CallStructParamsMethodAsync(TestService serviceToUse)
        {
            TestStructA arg = new TestStructAImpl();

            arg.X = m_random.Next(100);
            arg.Y = -1 * m_random.Next(100);

            StructParamsCallDelegate scd = new StructParamsCallDelegate(serviceToUse.TestEchoStruct);
            // async call
            IAsyncResult ar = scd.BeginInvoke(arg, null, null);
            // wait for response
            TestStructA result = scd.EndInvoke(ar);

            Assertion.AssertEquals(arg.X, result.X);
            Assertion.AssertEquals(arg.Y, result.Y);
        }
Esempio n. 3
0
 public TestStructA TestEchoStruct(TestStructA arg) {
     return arg;
 }
Esempio n. 4
0
 public TestStructA TestEchoStruct(TestStructA arg)
 {
     return(arg);
 }
Esempio n. 5
0
 public void TestStruct() {
     TestStructA arg = new TestStructA();
     arg.X = 11;
     arg.Y = -15;
     TestStructA result = m_testService.TestEchoStruct(arg);
     Assert.AreEqual(arg.X, result.X);
     Assert.AreEqual(arg.Y, result.Y);
 }