コード例 #1
0
ファイル: PushPayload.cs プロジェクト: wawa0210/JpushDemo
        public PushPayload(Platform platform, Audience audience, Message message , Options options = null)
        {
            Debug.Assert(platform != null);
            Debug.Assert(audience != null);
            Debug.Assert(message != null);

            this.platform = platform;
            this.audience = audience;
            this.message = message;
            this.options = 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, SmsMessage sms_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.sms_message = sms_message;
            this.options = options;

            jSetting = new JsonSerializerSettings();
            jSetting.NullValueHandling = NullValueHandling.Ignore;
            jSetting.DefaultValueHandling = DefaultValueHandling.Ignore;
        }
コード例 #3
0
ファイル: PushPayload.cs プロジェクト: XIEBBS/cn.jpush.api
        public PushPayload(
            Platform platform,
            Audience audience,
            Notification notification,
            Message message        = null,
            SmsMessage sms_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.sms_message  = sms_message;
            this.options      = options;
            JsonSerializerSettings serializerSettings = new JsonSerializerSettings();

            serializerSettings.NullValueHandling    = NullValueHandling.Ignore;
            serializerSettings.DefaultValueHandling = DefaultValueHandling.Ignore;
            this.jSetting = serializerSettings;
        }
コード例 #4
0
ファイル: PushPayload.cs プロジェクト: XIEBBS/cn.jpush.api
 public static PushPayload MessageAll(string msgContent)
 {
     return(new PushPayload(Platform.all(), Audience.all(), (Notification)null, Message.content(msgContent), (SmsMessage)null, new Options()));
 }
コード例 #5
0
ファイル: PushPayload.cs プロジェクト: XIEBBS/cn.jpush.api
 public static PushPayload AlertAll(string alert)
 {
     return(new PushPayload(Platform.all(), Audience.all(), new Notification().setAlert(alert), (Message)null, (SmsMessage)null, new Options()));
 }