예제 #1
0
 private static void Enqueue(AlertNotification notification, int count)
 {
     for (var i = 0; i < count; i++)
     {
         Queue.Enqueue(notification);
     }
 }
예제 #2
0
        public static async Task Main()
        {
            var keyId = "test-keyID";

            var privateSigningKey =
                @"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgevZzL1gdAFr88hb2OF/2NxApJCzGCEDdfSp6VQO30hyhRANCAAQRWz+jn65BtOMvdyHKcvjBeBSDZH2r1RTwjmYSi9R/zpBnuQ4EiMnCqfMPWiZqB4QdbAd0E7oH50VpuZ1P087G";

            var teamId = "testTeamId";

            var tokenGenerator = new TokenGenerator(keyId, privateSigningKey, teamId);

            var notification = new AlertNotification("ttt", "sss", "bbb", 1, "sss");

            Enqueue(notification, 10_100);

            await SendNotificationsAsync(tokenGenerator);
        }