private IndexProgressPushNotification GetNotification(string currentUserName, string notificationId) { IndexProgressPushNotification notification = null; if (!string.IsNullOrEmpty(notificationId)) { var searchCriteria = new PushNotificationSearchCriteria { Ids = new[] { notificationId } }; var searchResult = _pushNotificationManager.SearchNotifies(currentUserName, searchCriteria); notification = searchResult?.NotifyEvents.OfType <IndexProgressPushNotification>().FirstOrDefault(); } var result = notification ?? CreateNotification(currentUserName, notificationId); return(result); }
public IHttpActionResult Search(PushNotificationSearchCriteria criteria) { var retVal = _pushNotifier.SearchNotifies(User.Identity.Name, criteria); return(Ok(retVal)); }