Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JPushClient" /> class.
 /// </summary>
 /// <param name="appKey">The application key.</param>
 /// <param name="masterSecret">The master secret.</param>
 /// <param name="pushResultUpdate">The update push message status delegate.</param>
 /// <param name="pushTrackingInitialize">The initialize delegate.</param>
 /// <param name="exceptionReport">The exception delegate.</param>
 /// <param name="threadInterval">The interval in second.</param>
 public JPushHandler(string appKey, string masterSecret, int threadInterval = 60, UpdatePushResult pushResultUpdate = null, InitializePushTracking pushTrackingInitialize = null, ReportException exceptionReport = null)
 {
     JPushClient = new JPushClient(appKey, masterSecret, true);
     if (threadInterval < 1)
     {
         threadInterval = 60;
     }
     this.ThreadInterval         = threadInterval;
     this.PushTrackings          = new List <Tracking>();
     this.DataLocker             = new object();
     this.PushResultUpdate       = pushResultUpdate;
     this.PushTrackingInitialize = pushTrackingInitialize;
     this.ExceptionReport        = exceptionReport;
     this.InitializeMonitorThreadInBackground();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="JPushClient" /> class.
 /// </summary>
 /// <param name="appKey">The application key.</param>
 /// <param name="masterSecret">The master secret.</param>
 /// <param name="pushResultUpdate">The update push message status delegate.</param>
 /// <param name="pushTrackingInitialize">The initialize delegate.</param>
 /// <param name="exceptionReport">The exception delegate.</param>
 /// <param name="threadInterval">The interval in second.</param>
 public JPushHandler(string appKey, string masterSecret, int threadInterval = 60, UpdatePushResult pushResultUpdate = null, InitializePushTracking pushTrackingInitialize = null, ReportException exceptionReport = null)
 {
     JPushClient = new JPushClient(appKey, masterSecret, true);
     if (threadInterval < 1)
         threadInterval = 60;
     this.ThreadInterval = threadInterval;
     this.PushTrackings = new List<Tracking>();
     this.DataLocker = new object();
     this.PushResultUpdate = pushResultUpdate;
     this.PushTrackingInitialize = pushTrackingInitialize;
     this.ExceptionReport = exceptionReport;
     this.InitializeMonitorThreadInBackground();
 }