public static void SendAsynchronously(this INotificationContent notification, Uri channelUri, IAccessTokenProvider accessTokenProvider, Action<NotificationSendResult> sent, Action<NotificationSendResult> error, NotificationSendOptions options)
        {
            var payload = notification.GetContent();
            var type = notification.GetNotificationType();

            NotificationSendUtils.SendAsynchronously(channelUri, accessTokenProvider, payload, sent, error, type, options);
        }
        public static NotificationSendResult Send(this INotificationContent notification, Uri channelUri, IAccessTokenProvider accessTokenProvider, NotificationSendOptions options)
        {
            var payload = notification.GetContent();
            var type = notification.GetNotificationType();

            return NotificationSendUtils.Send(channelUri, accessTokenProvider, payload, type, options);
        }
        public ActionResult SendNotification(
            [ModelBinder(typeof(NotificationTemplateModelBinder))] INotificationContent notification,
            string channelUrl,
            NotificationPriority priority = NotificationPriority.Normal)
        {
            var options = new NotificationSendOptions()
                {
                    Priority = priority
                };

            NotificationSendResult result = notification.Send(new Uri(channelUrl), this.tokenProvider, options);

            object response = new
            {
                DeviceConnectionStatus = result.DeviceConnectionStatus.ToString(),
                NotificationStatus = result.NotificationStatus.ToString(),
                Status = result.LookupHttpStatusCode()
            };

            return this.Json(response);
        }
 public static NotificationSendResult Send(Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, NotificationType type, NotificationSendOptions options)
 {
     return Send(channelUri, accessTokenProvider, payload, type, options.SecondsTTL, options.Cache, options.RequestForStatus, options.Tag, options.Priority);
 }
 public static void SendAsynchronously(Uri channelUri, IAccessTokenProvider accessTokenProvider, string payload, Action<NotificationSendResult> sent, Action<NotificationSendResult> error, NotificationType type, NotificationSendOptions options)
 {
     SendAsynchronously(channelUri, accessTokenProvider, payload, sent, error, type, options.SecondsTTL, options.Cache, options.RequestForStatus, options.Tag, options.Priority);
 }