Last post Feb 05, 2014 09:00 PM by Amy Peng - MSFT
Jan 31, 2014 08:48 AM|mou_inn|LINK
if wcf service is design the below way then please guide me how call Add() function
Asynchronously from client side. thanks
public interface IAddTwoNumbers
// If the asynchronous method pair
// appears on the client channel, the client can call
// them asynchronously to prevent blocking.
IAsyncResult BeginAdd(int a, int b, AsyncCallback cb, AsyncState s);
int EndAdd(IAsyncResult r);
// This is a synchronous version of the BeginAdd/EndAdd pair.
// It appears in the client channel code by default.
int Add(int a, int b);
Feb 05, 2014 09:00 PM|Amy Peng - MSFT|LINK
Please try to check the reply in your second thread:
The Add method creates a client object and it is normally the same with both sync and async methods. Once you get the client object the client is the AsyncState object of part of the AsyncState object in the call back function