コード例 #1
0
ファイル: AdapterContent.cs プロジェクト: nearit/Xamarin-SDK
        public static XCContentNotification GetCommonType(NITContent ContentNotification)
        {
            XCContentNotification XContent = new XCContentNotification();

            XContent.NotificationMessage = ContentNotification.NotificationMessage;
            XContent.Title   = ContentNotification.Title;
            XContent.Content = ContentNotification.Content;
            if (ContentNotification.Image != null)
            {
                XContent.ImageLink = new XCImageSet
                {
                    FullSize  = ContentNotification.Image.Url.AbsoluteString,
                    SmallSize = ContentNotification.Image.SmallSizeURL.AbsoluteString
                };
            }

            if (ContentNotification.Link != null)
            {
                XContent.Cta = new XCContentLink
                {
                    Label = ContentNotification.Link.Label,
                    Url   = ContentNotification.Link.Url.AbsoluteString
                };
            }
            XContent.Id = ContentNotification.ID;

            return(XContent);
        }
コード例 #2
0
ファイル: AdapterContent.cs プロジェクト: nearit/Xamarin-SDK
        public static XCContentNotification GetCommonType(Content ContentNotification)
        {
            XCContentNotification XContent = new XCContentNotification();

            XContent.NotificationMessage = ContentNotification.NotificationMessage;
            XContent.Title   = ContentNotification.Title;
            XContent.Content = ContentNotification.ContentString;

            if (ContentNotification.ImageLink != null)
            {
                XContent.ImageLink           = new XCImageSet();
                XContent.ImageLink.FullSize  = ContentNotification.ImageLink.FullSize;
                XContent.ImageLink.SmallSize = ContentNotification.ImageLink.SmallSize;
            }

            if (ContentNotification.Cta != null)
            {
                XContent.Cta       = new XCContentLink();
                XContent.Cta.Label = ContentNotification.Cta.Label;
                XContent.Cta.Url   = ContentNotification.Cta.Url;
            }
            XContent.Id = ContentNotification.Id;

            return(XContent);
        }
コード例 #3
0
            public override void GotContent(NITContent Content, NITTrackingInfo TrackingInfo)
            {
                XCContentNotification XContent = AdapterContent.GetCommonType(Content);

                if (NearPCL.GetContentManager() != null)
                {
                    NearPCL.GetContentManager().GotXContentNotification(XContent);
                }
                else
                {
                    Console.WriteLine("You receive a content but you haven't registered a content manager");
                }
            }
コード例 #4
0
ファイル: MainPage.xaml.cs プロジェクト: nearit/Xamarin-SDK
 public void GotXContentNotification(XCContentNotification notification)
 {
     throw new NotImplementedException();
 }