ITLab.Template.DevPack.Notifications
Root namespace for platform-specific notification message models. Subfolders cover each supported channel.
Subnamespaces
| Subnamespace | Canal | Descrição |
|---|---|---|
Notifications/Email | Contracts for transactional email: IEmailService, IEmailTemplateRenderer, IEmailTemplateRepository (impls in the consumer) | |
Notifications/MicrosoftTeams | Microsoft Teams | Adaptive Card payloads and direct/channel message models |
Notifications/Slack | Slack | Block Kit message models |
Como usar
// Build a Teams notification message model from application code.
// `myNotificationService` is the consumer's implementation — the DevPack only
// ships the message model. There is no `INotificationService` shipped here.
var message = new MicrosoftTeamsMessage(card: myAdaptiveCard, recipientEmail: "user@company.com");
await myNotificationService.SendAsync(message, cancellationToken);
O que não fazer
- Do not place delivery logic (HTTP clients, retry policies) inside the message model classes.
- Do not share a single message instance across multiple dispatch calls if the model is mutable.
- Do not expect a built-in
INotificationServiceinterface or HTTP dispatcher — the DevPack ships only the message model contracts; the consumer wires the delivery layer.
Extensão pelo produto
- Products implement a notification service that accepts these models and handles channel-specific delivery.
- Additional channels (push, ...) follow the same pattern: add a subfolder with message model types. Email differs — it ships service/renderer/repository contracts under
Email/(see that README), not just a message model.