How can I implement client-side async calls with WCF's ChannelFactory<T>?
问题 Suppose we are writing a client for a Calculator web service using WCF's ChannelFactory. The service contract is shared by way of a third assembly referenced by both the implementation service and the client. Below is the service contract (which cannot be changed!) public interface ICalculator { int Add(int x, int y); } The ChannelFactory creates a transparent proxy object that "mocks" the ICalculator service contract, passing method calls to a RealProxy object which then sends the message