Пример #1
0
 //construct
 public PushPayload()
 {
     platform = null;
     audience = null;
     notification = null;
     message = null;
     options = new Options();
     jSetting = new JsonSerializerSettings();
     jSetting.NullValueHandling = NullValueHandling.Ignore;
     jSetting.DefaultValueHandling = DefaultValueHandling.Ignore;
 }
Пример #2
0
        public PushPayload(Platform platform, Audience audience, Notification notification, Message message = null, Options options = null)
        {
            Debug.Assert(platform != null);
            Debug.Assert(audience != null);
            Debug.Assert(notification != null || message != null);

            this.platform = platform;
            this.audience = audience;
            this.notification = notification;
            this.message = message;
            this.options = options;

            jSetting = new JsonSerializerSettings();
            jSetting.NullValueHandling = NullValueHandling.Ignore;
            jSetting.DefaultValueHandling = DefaultValueHandling.Ignore;
        }
Пример #3
0
 public void ResetOptionsTimeToLive(long timeToLive)
 {
     if (this.options == null)
     {
         this.options = new Options();
     }
     this.options.time_to_live = timeToLive;
 }
Пример #4
0
 public void ResetOptionsApnsProduction(bool apnsProduction)
 {
     if (this.options == null)
     {
         this.options = new Options();
     }
     this.options.apns_production = apnsProduction;
 }