Easy.Notifications.Core
1.0.0
dotnet add package Easy.Notifications.Core --version 1.0.0
NuGet\Install-Package Easy.Notifications.Core -Version 1.0.0
<PackageReference Include="Easy.Notifications.Core" Version="1.0.0" />
<PackageVersion Include="Easy.Notifications.Core" Version="1.0.0" />
<PackageReference Include="Easy.Notifications.Core" />
paket add Easy.Notifications.Core --version 1.0.0
#r "nuget: Easy.Notifications.Core, 1.0.0"
#:package Easy.Notifications.Core@1.0.0
#addin nuget:?package=Easy.Notifications.Core&version=1.0.0
#tool nuget:?package=Easy.Notifications.Core&version=1.0.0
Easy.Notifications.Core
The abstraction layer and shared models for the Easy Notification System.
This package contains the core interfaces (INotificationService, INotificationProvider), domain models (NotificationPayload, Recipient), and enums required to build or consume the notification system.
Note: This package does not contain the implementation logic (Background Worker) or database context. For the full functionality, please install
Easy.Notifications.
Installation
Install via NuGet Package Manager:
Install-Package Easy.Notifications.Core
Or via .NET CLI:
dotnet add package Easy.Notifications.Core
Key Features
- Unified Payload: A single
NotificationPayloadmodel to rule them all (Email, SMS, Chat). - Rich Recipient Model: Helper methods for creating Email, SMS, Teams, Slack, and Telegram recipients.
- Prioritization: Built-in
NotificationPriorityenum (Urgent, High, Normal, Low). - Templating Support: Dictionary-based template data structure.
- Metadata Support: Pass custom data (e.g., color codes for Teams cards) via Metadata.
- Clean Architecture: Pure C# POCOs and Interfaces. Zero external dependencies.
Supported Channels (Enum)
The NotificationChannelType enum currently supports:
Email(SMTP, SendGrid, Mailgun)Sms(Twilio, Vonage)Teams(Webhook)Slack(Webhook)Telegram(Bot API)WhatsApp(Twilio/Vonage)
Usage
This package is primarily used to construct the Notification Payload that will be sent to the dispatcher.
1. Creating a Notification Payload
using Easy.Notifications.Core.Models;
var payload = new NotificationPayload
{
// Basic Info
Subject = "Welcome Onboard!",
Body = "Hi {{Name}}, your account is ready.",
Priority = NotificationPriority.High,
// Grouping (for Batch Cancellation)
GroupId = "Campaign-2024-Feb",
// Dynamic Data for Templates
TemplateData = new Dictionary<string, string>
{
{ "Name", "John Doe" }
},
// Recipients (Multi-Channel)
Recipients = new List<Recipient>
{
Recipient.Email("john.doe@example.com", "John Doe"),
Recipient.Sms("+1234567890"),
Recipient.Teams("https://outlook.office.com/webhook/...") // Webhook URL
},
// Channel-Specific Metadata
Metadata = new Dictionary<string, object>
{
{ "ThemeColor", "FF0000" } // Red card for Teams
}
};
2. Implementing Custom Providers
If you want to build a custom provider (e.g., for Discord or Push Notifications), you only need to reference this Core package and implement the INotificationProvider interface.
using Easy.Notifications.Core.Abstractions;
using Easy.Notifications.Core.Models;
public class MyCustomProvider : INotificationProvider
{
public NotificationChannelType SupportedChannel => NotificationChannelType.MobilePush; // Assume you added this enum
public Task<bool> SendAsync(Recipient recipient, string subject, string body, Dictionary<string, object>? metadata)
{
// Your custom sending logic here...
return Task.FromResult(true);
}
}
Developer Note: In your application, you will inject
INotificationService(provided by the mainEasy.Notificationspackage) and use it to dispatch the payload you create here.
The Ecosystem
This package is part of a modular notification system:
| Package | Description |
|---|---|
Easy.Notifications.Core |
(You are here) Abstractions, Interfaces, and Models. |
Easy.Notifications |
The main engine. Includes Background Worker, Retry logic, Dispatcher, and default providers (SMTP, Twilio, etc.). |
Easy.Notifications.Persistence.EntityFramework |
Persistence layer for logging, status tracking, and retry mechanisms using EF Core. |
Contributing
Contributions and suggestions are welcome. Please open an issue or submit a pull request.
Contact
For questions, contact us via elmin.alirzayev@gmail.com or GitHub.
License
This project is licensed under the MIT License.
© 2025 Elmin Alirzayev / Easy Code Tools
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| .NET Framework | net47 is compatible. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Easy.Notifications.Core:
| Package | Downloads |
|---|---|
|
Easy.Notifications.Persistence.EntityFramework
Entity Framework and Entity Framework Core storage implementation for Easy.Notifications. Provides database logging, status tracking, and persistence for retry mechanisms. Compatible with SQL Server and other EF, EF Core providers. |
|
|
Easy.Notifications.Infrastructure
A robust, multi-channel notification library for .NET. Features: - Channels: Email (SMTP, SendGrid, Mailgun), SMS (Twilio, Vonage), Chat (Slack, Teams, Telegram). - Resilience: Automatic retries with exponential backoff. - Performance: Priority-based queuing (Urgent, High, Normal, Low). - Monitoring: Real-time tracking via SignalR and Dashboard reporting. - Management: Group-based cancellation (Campaigns). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 284 | 2/6/2026 |
-