Apple.PushServiceSamples.Simple C# (CSharp) Method

Simple() public method

public Simple ( ) : void
return void
        public void Simple()
        {
            var service = new PushService
                              {
                                  RequestBuilder = ServerRequestBuilder.Instance
                              };
            var notification = new PushNotificationRequest
                                   {
                                       Tags = new List<string> {"MyTag"},
                                       ExcludeTokens = new List<string> {"TokenToExclude"},
                                       DeviceTokens = new List<string> {"AppleDeviceId"},
                                       Aliases = new List<string> {"MyAlias"},
                                       Payload = new PushPayload
                                                     {
                                                         Alert = "Alert 2",
                                                         Badge = Badge.SetTo(2),
                                                         Sound = "Sound1"
                                                     }
                                   };
            service.Execute(notification, response => Debug.WriteLine("Success"),ExceptionHandler.Handle);
        }
PushServiceSamples