Ejemplo n.º 1
0
        private UM_NotificationRequest ToUMRequest(AN_NotificationRequest android_request)
        {
            var content = new UM_Notification();

            content.SetTitle(android_request.Content.Title);
            content.SetBody(android_request.Content.Text);

            var interval            = (long)android_request.Trigger.Seconds;
            var repeating           = android_request.Trigger.Repeating;
            var timeIntervalTrigger = new UM_TimeIntervalNotificationTrigger(interval);

            timeIntervalTrigger.SerRepeating(repeating);

            var request = new UM_NotificationRequest(android_request.Identifier, content, timeIntervalTrigger);

            return(request);
        }
        private UM_NotificationRequest ToUMRequest(ISN_UNNotificationRequest ios_request)
        {
            var content = new UM_Notification();

            content.SetTitle(ios_request.Content.Title);
            content.SetBody(ios_request.Content.Body);

            var timeIntervalTrigger = (ISN_UNTimeIntervalNotificationTrigger)ios_request.Trigger;


            var interval  = timeIntervalTrigger.TimeInterval;
            var repeating = timeIntervalTrigger.Repeats;
            var trigger   = new UM_TimeIntervalNotificationTrigger(interval);

            trigger.SerRepeating(repeating);

            var Identifier = Convert.ToInt32(ios_request.Identifier);
            var request    = new UM_NotificationRequest(Identifier, content, trigger);

            return(request);
        }