示例#1
0
 /// <summary>
 /// Sends the notification.
 /// </summary>
 /// <param name="notification">The notification.</param>
 /// <returns></returns>
 private async Task SendNotification(WalletNotification notification)
 {
     try
     {
         using (var notificationService = new DepositNotifier())
         {
             await notificationService.SendNotification(NotificationLevelType.Info, notification.UserId, notification.Header, notification.Message);
         }
     }
     catch (Exception ex)
     {
         LogError(ex, "SendNotification", "Failed to send notification");
     }
 }
示例#2
0
 private async Task SendBalanceNotification(Guid userId, int currencyId, string symbol)
 {
     try
     {
         using (var notificationService = new DepositNotifier())
         {
             await notificationService.SendDataNotification(DataNotificationType.BalanceUpdate, userId, new
             {
                 CurrencyId = currencyId,
                 Symbol     = symbol
             });
         }
     }
     catch (Exception ex)
     {
         LogError(ex, "SendNotification", "Failed to send notification");
     }
 }