Ejemplo n.º 1
0
        public void Blackberry_Simple_Test()
        {
            var waitCallback = new ManualResetEvent(false);

            var settings = new BlackberryPushChannelSettings("APPID", "PWD");

            var c = new BlackberryPushChannel(settings);

            var n = new BlackberryNotification();

            n.Content = new BlackberryMessageContent("text/plain", "66");

            n.QualityOfService       = QualityOfServiceLevel.Unconfirmed;
            n.SourceReference        = "3682-8s4B97Rc2388i46I8M08769D005ra6286o4";
            n.DeliverBeforeTimestamp = DateTime.UtcNow.AddMinutes(1);
            var r = new BlackberryRecipient("push_all");

            n.Recipients.Add(r);

            c.SendNotification(n, (sender, resp) => {
                waitCallback.Set();
            });

            waitCallback.WaitOne();
        }
Ejemplo n.º 2
0
 public static void RegisterBlackberryService(this PushBroker broker, BlackberryPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null)
 {
     RegisterBlackberryService(broker, channelSettings, null, serviceSettings);
 }
Ejemplo n.º 3
0
 public static void RegisterBlackberryService(this PushBroker broker, BlackberryPushChannelSettings channelSettings, string applicationId = null, IPushServiceSettings serviceSettings = null)
 {
     broker.RegisterService <BlackberryNotification>(new BlackberryPushService(channelSettings, serviceSettings), applicationId);
 }