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); }
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); }