public void loadLastPushNotificationData(XMLRPCCompletedEventHandler <IntResponseObject> respHandler) { string device_uuid = this.getDeviceUUID(); if (device_uuid == null) { return; //emulators } List <Blog> blogs = DataService.Current.Blogs.ToList(); string username = string.Empty; string password = string.Empty; foreach (Blog currentBlog in blogs) { if (currentBlog.isWPcom() || currentBlog.hasJetpack()) { if (currentBlog.isWPcom()) { username = currentBlog.Username; password = currentBlog.Password; } else if (currentBlog.DotcomUsername != null && currentBlog.DotcomPassword != null) { username = currentBlog.DotcomUsername; password = currentBlog.DotcomPassword; } } } if (username != string.Empty && password != string.Empty) { PushNotificationGetLastNotification rpc = new PushNotificationGetLastNotification(pushNotificationURL, username, password, device_uuid); if (respHandler != null) { rpc.Completed += respHandler; } rpc.ExecuteAsync(); } }
public void loadLastPushNotificationData(XMLRPCCompletedEventHandler<IntResponseObject> respHandler) { string device_uuid = this.getDeviceUUID(); if (device_uuid == null) return; //emulators List<Blog> blogs = DataService.Current.Blogs.ToList(); string username = string.Empty; string password = string.Empty; foreach (Blog currentBlog in blogs) { if (currentBlog.isWPcom() || currentBlog.hasJetpack()) { if (currentBlog.isWPcom()) { username = currentBlog.Username; password = currentBlog.Password; } else if (currentBlog.DotcomUsername != null && currentBlog.DotcomPassword != null) { username = currentBlog.DotcomUsername; password = currentBlog.DotcomPassword; } } } if (username != string.Empty && password != string.Empty) { PushNotificationGetLastNotification rpc = new PushNotificationGetLastNotification(pushNotificationURL, username, password, device_uuid); if (respHandler!=null) rpc.Completed += respHandler; rpc.ExecuteAsync(); } }