/
VFlov
/
NotificationService_1
Обзор
Документация
Войти
/
VFlov
/
NotificationService_1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/Shared/NotificationService.Shared/Constants/QueueNames.cs
25 строк
1 KB
VFlov
first_commit
27 ноя 2025, 11:43
27 ноя 2025, 11:43
819df67
Код
Авторство
О чём код?
namespace NotificationService.Shared.Constants; /// <summary> /// Константы для имен очередей RabbitMQ /// </summary> public static class QueueNames { public const string EmailQueue = "notifications.email"; public const string SmsQueue = "notifications.sms"; public const string PushQueue = "notifications.push"; public const string TelegramQueue = "notifications.telegram"; public const string WhatsAppQueue = "notifications.whatsapp"; public const string SlackQueue = "notifications.slack"; public static string GetQueueName(Models.NotificationType type) => type switch { Models.NotificationType.Email => EmailQueue, Models.NotificationType.Sms => SmsQueue, Models.NotificationType.Push => PushQueue, Models.NotificationType.Telegram => TelegramQueue, Models.NotificationType.WhatsApp => WhatsAppQueue, Models.NotificationType.Slack => SlackQueue, _ => throw new ArgumentException($"Unsupported notification type: {type}") }; }