if wcf service is design the below way then please guide me how call Add()
function Asynchronously
from client side. thanks
[ServiceContract]
public interface IAddTwoNumbers
{
// If the asynchronous method pair
// appears on the client channel, the client can call
// them asynchronously to prevent blocking.
[OperationContract (AsyncPattern=true)]
IAsyncResult BeginAdd(int a, int b, AsyncCallback cb, AsyncState s);
[OperationContract]
int EndAdd(IAsyncResult r);
// This is a synchronous version of the BeginAdd/EndAdd pair.
// It appears in the client channel code by default.
[OperationContract]
int Add(int a, int b);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…