code_junkie

Is there a way to get error feedback on asynchronous WCF calls

Nov 13th, 2011
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. private void go_Click(object sender, EventArgs e)
  2. {
  3. client.BeginDoMyStuff(myValue, new AsyncCallback(OnEndDoMyStuff), null);
  4. }
  5.  
  6. public void OnEndDoMyStuff(IAsyncResult asyncResult)
  7. {
  8. this.Invoke(new MethodInvoker(delegate() {
  9. // This will throw if we have had an error
  10. client.EndDoMyStuff(asyncResult);
  11. }));
  12. }
Add Comment
Please, Sign In to add comment