Reputation: 3839
I am consuming a 'third party' WCF service. I am making to call to their method in Async mode from C# console application.
The order I am making call is 1. WCF.MethodA (Async) 2. WCF.MethodB (Async) 3. WCF.MethodC (Async)
I wanted to raise an event (which makes call to 'MethodB') after call to 'MethodA' is successfully complete. Can anyone tell me how to do that? Is that something the service needs to support (raising events)?
Thanks
Upvotes: 3
Views: 1066
Reputation: 564363
If you turn on the asynchronous option when you add the service reference, you'll get asynchronous calls with events.
For example, you should get WCF.MethodAAsync
with a WCF.MethodACompleted
event automatically. You can subscribe to the completion events, and start the next method upon completion.
Upvotes: 3