public static Common.Notification Create(Common.PlatformType platform)
        {
            switch (platform)
            {
            case Common.PlatformType.Apple:
                return(Apple());

            case Common.PlatformType.AndroidC2dm:
                return(AndroidC2dm());

            case Common.PlatformType.AndroidGcm:
                return(AndroidGcm());

            case Common.PlatformType.Windows:
                return(Windows());

            case Common.PlatformType.WindowsPhone:
                return(WindowsPhone());

            case Common.PlatformType.Blackberry:
                return(Blackberry());

            default:
                return(null);
            }
        }
        public static Common.Notification Create(Common.PlatformType platform)
        {
#if !NETCOREAPP1_1
            switch (platform)
            {
            case Common.PlatformType.Apple:
                return(Apple());

            case Common.PlatformType.AndroidGcm:
                return(Google());

            case Common.PlatformType.Blackberry:
                return(BlackBerry());

            case Common.PlatformType.Windows:
                return(Windows());

            default:
                return(null);
            }
#else
            return(null);
#endif
        }
示例#3
0
 static void Events_OnChannelCreated(Common.PlatformType platformType, int newChannelCount)
 {
     Console.WriteLine("Channel Created for: " + platformType.ToString() + " Channel Count: " + newChannelCount);
 }
示例#4
0
 static void Events_OnDeviceSubscriptionExpired(Common.PlatformType platform, string deviceInfo, Common.Notification notification)
 {
     Console.WriteLine("Device Subscription Expired: " + platform.ToString() + " -> " + deviceInfo);
 }
示例#5
0
 static void Events_OnChannelException(Exception exception, Common.PlatformType platformType, Common.Notification notification)
 {
     Console.WriteLine("Channel Exception: " + platformType.ToString() + " -> " + exception.ToString());
 }
示例#6
0
 static void Events_OnDeviceSubscriptionIdChanged(Common.PlatformType platform, string oldDeviceInfo, string newDeviceInfo, Common.Notification notification)
 {
     //Currently this event will only ever happen for Android GCM
     Console.WriteLine("Device Registration Changed:  Old-> " + oldDeviceInfo + "  New-> " + newDeviceInfo);
 }