Created
April 11, 2012 09:18
-
-
Save bendiksolheim/2358198 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void GetPushUri() | |
{ | |
Channel = HttpNotificationChannel.Find(CHANNEL_NAME); | |
if (Channel != null) | |
{ | |
System.Diagnostics.Debug.WriteLine("Channel URI: " + Channel.ChannelUri.ToString()); | |
} | |
else | |
{ | |
Channel = new HttpNotificationChannel(CHANNEL_NAME); | |
Channel.HttpNotificationReceived += new EventHandler<HttpNotificationEventArgs>(HttpNotificationReceived); | |
Channel.ShellToastNotificationReceived += new EventHandler<NotificationEventArgs>(ShellToastNotificationReceived); | |
Channel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(ChannelUriUpdated); | |
Channel.ConnectionStatusChanged += new EventHandler<NotificationChannelConnectionEventArgs>(ConnectionStatusChanged); | |
Channel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>(ErrorOccured); | |
Channel.Open(); | |
System.Diagnostics.Debug.WriteLine("Trying to open HttpNotificationChannel"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment