Exemplo n.º 1
0
 private static void OnTimerElapsed(object sender)
 {
     HostingEnvironment.QueueBackgroundWorkItem(
         async ct =>
     {
         var i = 1;
         while (i > 0)
         {
             i = await PushNotificationDeliveryManager.SendNextReadyNotificationAsync(ct);
         }
     });
 }
Exemplo n.º 2
0
        private static void OnTimerElapsed(object sender)
        {
            Console.Out.WriteLine("delivery timer elapsed");
            var i = 1;

            while (i > 0)
            {
                var task = PushNotificationDeliveryManager.SendNextReadyNotificationAsync(CancellationToken.None);
                i = task.Result;
                if (i > 0)
                {
                    Console.Out.WriteLine("one message delivered");
                }
            }
            Console.Out.WriteLine("delivery complete");
        }