Ejemplo n.º 1
0
 public static void HandleContent(NSObject content, IContentsListener listener)
 {
     if (content.GetType() == typeof(NITContent))
     {
         NITContent cont = (NITContent)content;
         listener.GotContentNotification(cont);
     }
     else if (content.GetType() == typeof(NITSimpleNotification))
     {
         NITSimpleNotification cont = (NITSimpleNotification)content;
         listener.GotSimpleNotification(cont);
     }
     else if (content.GetType() == typeof(NITCoupon))
     {
         NITCoupon cont = (NITCoupon)content;
         listener.GotCouponNotification(cont);
     }
     else if (content.GetType() == typeof(NITCustomJSON))
     {
         NITCustomJSON cont = (NITCustomJSON)content;
         listener.GotCustomJSONNotification(cont);
     }
     else if (content.GetType() == typeof(NITFeedback))
     {
         NITFeedback cont = (NITFeedback)content;
         listener.GotFeedbackNotification(cont);
     }
 }
Ejemplo n.º 2
0
        public static XCSimpleNotification GetCommonType(NITSimpleNotification SimpleNotification)
        {
            XCSimpleNotification XSimple = new XCSimpleNotification();

            XSimple.NotificationMessage = SimpleNotification.NotificationMessage;
            XSimple.Id = SimpleNotification.ID;

            return(XSimple);
        }
Ejemplo n.º 3
0
            public override void GotSimpleNotification(NITSimpleNotification Notification, NITTrackingInfo TrackingInfo)
            {
                XCSimpleNotification XSimple = AdapterSimple.GetCommonType(Notification);

                if (NearPCL.GetContentManager() != null)
                {
                    NearPCL.GetContentManager().GotXSimpleNotification(XSimple);
                }
                else
                {
                    Console.WriteLine("You receive a content but you haven't registered a content manager");
                }
            }