private void PushChannel_ShellToastNotificationReceived(object sender, NotificationEventArgs e) { var message = e.Collection["wp:Text1"]; IDictionary <string, string> data = null; if (e.Collection.ContainsKey("wp:Param") && e.Collection["wp:Param"] != null) { data = UrlQueryParser.ParseQueryString(e.Collection["wp:Param"]); } OnPushNotification(message, data); }
private void OnPushNotification(PushNotificationChannel sender, PushNotificationReceivedEventArgs args) { if (args.ToastNotification == null) { return; } var message = args.ToastNotification.Content.InnerText; var launch = args.ToastNotification.Content.GetElementsByTagName("toast")[0].Attributes.GetNamedItem("launch"); IDictionary <string, string> data = new Dictionary <string, string>(); if (launch != null) { data = UrlQueryParser.ParseQueryString(launch.InnerText); } OnPushNotification(message, data); }