Skip to content

Instantly share code, notes, and snippets.

@johnsheehan
Created July 28, 2010 05:54
Show Gist options
  • Save johnsheehan/493534 to your computer and use it in GitHub Desktop.
Save johnsheehan/493534 to your computer and use it in GitHub Desktop.
twilio.SendSmsMessageAsync("5551111111", "5552222222", "Async! ", (msg) => {
Dispatcher.BeginInvoke(() => { txtOutput.Text = msg.Sid; });
});
twilio.SendSmsMessageAsync("5551111111", "5552222222", "Async! ", smsSent);
public void smsSent(SmsMessage msg) {
Dispatcher.BeginInvoke(() => { txtOutput.Text = msg.Sid; });
}
// or
twilio.SendSmsMessageAsync("5551111111", "5552222222", "Async!");
twilio.SendSmsMessageCompleted += smsCompleted;
public void smsCompleted(object sender, SmsCompletedEventArgs e) {
Dispatcher.BeginInvoke(() => { txtOutput.Text = e.Message.Sid; });
}
@johnsheehan
Copy link
Author

That looks awesome! I think I need to dig into Rx.........

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment