Indice.Services
8.60.0
See the version list below for details.
dotnet add package Indice.Services --version 8.60.0
NuGet\Install-Package Indice.Services -Version 8.60.0
<PackageReference Include="Indice.Services" Version="8.60.0" />
<PackageVersion Include="Indice.Services" Version="8.60.0" />
<PackageReference Include="Indice.Services" />
paket add Indice.Services --version 8.60.0
#r "nuget: Indice.Services, 8.60.0"
#:package Indice.Services@8.60.0
#addin nuget:?package=Indice.Services&version=8.60.0
#tool nuget:?package=Indice.Services&version=8.60.0
Indice.Services
A comprehensive library of infrastructure service abstractions and implementations for .NET applications. This package provides production-ready integrations with Azure services and popular third-party providers for common application needs.
Installation
dotnet add package Indice.Services
Features
📁 File Storage
Store and retrieve files using different backing stores:
| Implementation | Description |
|---|---|
FileServiceAzureStorage |
Azure Blob Storage |
FileServiceLocal |
Local file system |
FileServiceInMemory |
In-memory (for testing) |
// Azure Blob Storage
services.AddFilesAzure(options => {
options.ConnectionStringName = "StorageConnection";
options.ContainerName = "my-container";
});
// Local file system
services.AddFilesLocal(options => {
options.Path = "uploads";
});
🔧 Configuration (Azure Storage)
AzureClientFactory resolves the connection by ConnectionStringName (StorageConnection by default):
- First from
ConnectionStrings:{ConnectionStringName}(or a direct value with the same key) - Otherwise from managed-identity settings under
{ConnectionStringName}
Standard connection string:
{
"ConnectionStrings": {
"StorageConnection": "DefaultEndpointsProtocol=https;AccountName=<NAME>;AccountKey=xxx;EndpointSuffix=core.windows.net"
}
}
Managed Identity (system-assigned):
{
"StorageConnection": {
"accountName": "<NAME>",
"serviceUri": "<SERVICE_URI>"
}
}
Managed Identity (user-assigned):
{
"StorageConnection": {
"accountName": "<NAME>",
"serviceUri": "<SERVICE_URI>",
"clientId": "<CLIENT_ID>"
}
}
For Azure Functions host, you need to provide these extra values too:
AzureWebJobsStorage__accountName = <NAME>
AzureWebJobsStorage__serviceUri = <BASE_SERVICE_URL>
For user-assigned Managed Identity, add this too:
AzureWebJobsStorage__clientId = <CLIENT_ID>
Proper RBAC roles to be assigned to the Managed Identity:
- Storage Account Contributor
- Storage Blob Data Owner
- Storage Queue Data Contributor
- Storage Queue Data Message Processor
- Storage Queue Data Message Sender
- Storage Queue Data Reader
📧 Email Services
Send emails through various providers with template rendering support:
Provider key (Email:Provider) |
Service Name | Add method | Configuration section |
|---|---|---|---|
Smtp |
EmailServiceSmtp |
services.AddEmailServiceSmtp(configuration) |
Email |
SendGrid |
EmailServiceSendGrid |
services.AddEmailServiceSendGrid(configuration) |
SendGrid |
SparkPost |
EmailServiceSparkPost |
services.AddEmailServiceSparkPost(configuration) |
SparkPost |
Brevo |
EmailServiceBrevo |
services.AddEmailServiceBrevo(configuration) |
Brevo |
WeMail |
EmailServiceWeMail |
services.AddEmailServiceWeMail(configuration) |
WeMail |
AzureCommunicationServices |
AzureCommunicationServicesEmailService |
services.AddEmailServiceAzureCommunicationServices(configuration) |
AzureCommunicationServices |
None |
EmailServiceNoop |
services.AddEmailServiceNoop() |
- |
// Auto-discover provider from configuration
services.AddEmailService(configuration);
Configuration examples (appsettings.json):
SMTP:
{
"Email": {
"Provider": "Smtp",
"Sender": "noreply@example.com",
"SenderName": "My App",
"SmtpHost": "smtp.example.com",
"SmtpPort": 587,
"Username": "smtp-user",
"Password": "smtp-password"
}
}
SendGrid:
{
"Email": {
"Provider": "SendGrid"
},
"SendGrid": {
"Sender": "noreply@example.com",
"SenderName": "My App",
"ApiKey": "<sendgrid-api-key>",
"Api": "https://api.sendgrid.com/v3/"
}
}
SparkPost:
{
"Email": {
"Provider": "SparkPost"
},
"SparkPost": {
"Sender": "noreply@example.com",
"SenderName": "My App",
"ApiKey": "<sparkpost-api-key>",
"Api": "https://api.eu.sparkpost.com/api/v1/"
}
}
Brevo:
{
"Email": {
"Provider": "Brevo"
},
"Brevo": {
"Sender": "noreply@example.com",
"SenderName": "My App",
"ApiKey": "<brevo-api-key>",
"Api": "https://api.brevo.com/v3/"
}
}
WeMail:
{
"Email": {
"Provider": "WeMail"
},
"WeMail": {
"Sender": "noreply@example.com",
"SenderName": "MyApp",
"ApiKey": "<api-key>"
}
}
Azure Communication Services:
{
"Email": {
"Provider": "AzureCommunicationServices"
},
"AzureCommunicationServices": {
"Sender": "DoNotReply@<your-domain>",
"ClientId": "<app-client-id>",
"ClientSecret": "<app-client-secret>",
"TenantId": "<tenant-id>",
"ResourceEndpoint": "https://<resource-name>.<region>.communication.azure.com",
"WaitUntilCompleted": false
}
}
📱 SMS Services
Send SMS messages through multiple gateway providers:
Provider key (Sms:Provider) |
Implementation | Add method | Required configuration keys (under Sms) |
|---|---|---|---|
apifon |
SmsServiceApifon |
services.AddSmsServiceApifon(configuration) |
ApiKey, Token, Sender (or SenderName) |
apifon_im / apifonim |
SmsServiceApifonIM |
services.AddSmsServiceApifonIM(configuration) |
ApiKey, Token, Sender (or SenderName) |
kapatel / kapa_tel |
SmsServiceKapaTEL |
services.AddSmsServiceKapaTEL(configuration) |
Username, Password, From |
mstat |
SmsServiceOmniMessaging |
services.AddSmsServiceOmniMessaging(configuration) |
ApiKey, SenderName, AccountId |
smsup |
SmsServiceSmsUP |
services.AddSmsServiceSmsUp(configuration) |
ApiKey, Sender |
twilio |
SmsServiceTwilio |
services.AddSmsServiceTwilio(configuration) |
AccountSid, plus (ApiKey + Secret) or (AuthToken), and SenderPhoneNumber or MessagingServiceSid |
vonage |
SmsServiceVonage |
services.AddSmsServiceVonage(configuration) |
ApiKey, SignatureSecret, Sender (or SenderName) |
yuboto / yuboto_omni |
SmsServiceYubotoOmni |
services.AddSmsServiceYubotoOmni(configuration) |
ApiKey, Sender (or SenderName) |
yuboto_viber / yubotoviber / yuboto_omni_viber |
SmsServiceYubotoOmniViber |
services.AddSmsServiceYubotoOmniViber(configuration) |
ApiKey, Sender (or SenderName), optional ViberFallbackEnabled |
noop / none |
SmsServiceNoop |
services.AddSmsServiceNoop() |
- |
// Auto-discover provider(s) from Sms:Provider
services.AddSmsService(configuration);
{
"Sms": {
"Provider": "twilio",
"Sender": "MyApp",
"AccountSid": "<account-sid>",
"AuthToken": "<auth-token>",
"SenderPhoneNumber": "+15551234567"
}
}
🔗 Webhooks
Webhook services can be registered independently of SMS services, allowing webhook handling for SMS providers or other integrations.
Register webhook services directly:
services.AddWebhookServices<YourWebhookHandler, YourWebhookHttpHandler>(configuration);
For SMS provider-specific webhooks:
services.AddSmsWebhooks<YourWebhookHandler>(configuration);
Configuration:
{
"WebhookSettings": {
"Enabled": true,
"ChannelCapacity": 100
}
}
Enabled: Enables or disables webhook processing. Defaults tofalse.ChannelCapacity: Maximum number of pending webhook batches. Must be greater than zero when enabled.
Events are processed asynchronously by the hosted WebhookEventSink. When webhooks are disabled, webhook services are not registered.
Currently supported SMS providers: apifon.
Don't forget to also register Webhook endpoints for accepting and processing events:
app.MapWebhooks();
🔔 Push Notifications
Send push notifications via Azure Notification Hubs:
services.AddPushNotificationServiceAzure((sp, options) => {
options.ConnectionString = "your-connection-string";
options.NotificationHubPath = "your-hub-name";
});
📤 Event Dispatching
Dispatch events asynchronously using queue-based messaging:
| Implementation | Backing Store |
|---|---|
EventDispatcherAzure |
Azure Queue Storage |
EventDispatcherAzureServiceBus |
Azure Service Bus |
EventDispatcherInMemory |
In-memory (for testing) |
services.AddEventDispatcherAzure(configuration);
// Raise events
await eventDispatcher.RaiseEventAsync(new OrderCreatedEvent { OrderId = orderId });
🔒 Distributed Locking
Coordinate distributed operations using lease-based locking:
| Implementation | Backing Store |
|---|---|
LockManagerAzure |
Azure Blob Storage leases |
LockManagerInMemory |
In-memory (for testing) |
services.AddLockManagerAzure(configuration);
// Acquire and use a lock
await using var lease = await lockManager.AcquireLock("my-resource", TimeSpan.FromSeconds(30));
if (lease.IsAcquired) {
// Perform exclusive operation
}
📡 SignalR Proxy
Proxy SignalR connections through Azure SignalR Service:
services.AddSignalRProxyServices(configuration);
Configuration
Most services auto-configure from IConfiguration. Common connection string names:
| Service | Connection String Name |
|---|---|
| File Storage | StorageConnection |
| Event Dispatcher | StorageConnection |
| Lock Manager | StorageConnection |
| Service Bus | ServiceBusConnection |
Dependencies
- Azure.Storage.Blobs - Blob storage operations
- Azure.Storage.Queues - Queue storage operations
- Azure.Messaging.ServiceBus - Service Bus messaging
- MailKit - SMTP email sending
- Microsoft.Azure.NotificationHubs - Push notifications
- Microsoft.Azure.SignalR.Management - SignalR proxy
Target Frameworks
- .NET 8.0
- .NET 9.0
License
This project is licensed under the MIT License. See the LICENSE file for details.
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Azure.Communication.Email (>= 1.1.0)
- Azure.Identity (>= 1.21.0)
- Azure.Messaging.ServiceBus (>= 7.20.2)
- Azure.Storage.Blobs (>= 12.29.2)
- Azure.Storage.Queues (>= 12.27.1)
- Indice.Common (>= 8.60.0)
- MailKit (>= 4.18.1)
- Microsoft.AspNetCore.WebUtilities (>= 10.0.13)
- Microsoft.Azure.NotificationHubs (>= 4.2.0)
- Microsoft.Azure.SignalR.Management (>= 1.33.1)
- Microsoft.Extensions.Caching.Memory (>= 10.0.13)
- Microsoft.Extensions.Hosting (>= 10.0.13)
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Http.Resilience (>= 10.9.0)
-
net8.0
- Azure.Communication.Email (>= 1.1.0)
- Azure.Identity (>= 1.21.0)
- Azure.Messaging.ServiceBus (>= 7.20.2)
- Azure.Storage.Blobs (>= 12.29.2)
- Azure.Storage.Queues (>= 12.27.1)
- Indice.Common (>= 8.60.0)
- MailKit (>= 4.18.1)
- Microsoft.AspNetCore.WebUtilities (>= 8.0.32)
- Microsoft.Azure.NotificationHubs (>= 4.2.0)
- Microsoft.Azure.SignalR.Management (>= 1.33.1)
- Microsoft.Extensions.Caching.Memory (>= 9.0.21)
- Microsoft.Extensions.Hosting (>= 9.0.21)
- Microsoft.Extensions.Http (>= 9.0.21)
- Microsoft.Extensions.Http.Resilience (>= 9.10.0)
- System.Security.Cryptography.Pkcs (>= 10.0.13)
-
net9.0
- Azure.Communication.Email (>= 1.1.0)
- Azure.Identity (>= 1.21.0)
- Azure.Messaging.ServiceBus (>= 7.20.2)
- Azure.Storage.Blobs (>= 12.29.2)
- Azure.Storage.Queues (>= 12.27.1)
- Indice.Common (>= 8.60.0)
- MailKit (>= 4.18.1)
- Microsoft.AspNetCore.WebUtilities (>= 9.0.21)
- Microsoft.Azure.NotificationHubs (>= 4.2.0)
- Microsoft.Azure.SignalR.Management (>= 1.33.1)
- Microsoft.Extensions.Caching.Memory (>= 9.0.21)
- Microsoft.Extensions.Hosting (>= 9.0.21)
- Microsoft.Extensions.Http (>= 9.0.21)
- Microsoft.Extensions.Http.Resilience (>= 9.10.0)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Indice.Services:
| Package | Downloads |
|---|---|
|
Indice.AspNetCore
Package Description |
|
|
Indice.Hosting
Package Description |
|
|
Indice.Features.Messages.Core
Package Description |
|
|
Indice.Features.Messages.Worker.Azure
Package Description |
|
|
Indice.Features.Multitenancy.Worker.Azure
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.61.1 | 0 | 10/27/2026 |
| 8.61.0 | 108 | 10/26/2026 |
| 8.60.0 | 389 | 10/22/2026 |
| 8.59.0 | 628 | 10/20/2026 |
| 8.58.0 | 839 | 10/7/2026 |
| 8.57.0 | 1,962 | 9/23/2026 |
| 8.56.0 | 842 | 9/7/2026 |
| 8.55.0 | 631 | 9/3/2026 |
| 8.54.0 | 1,356 | 7/23/2026 |
| 8.53.0 | 707 | 7/21/2026 |
| 8.52.0 | 1,220 | 7/17/2026 |
| 8.51.1 | 621 | 7/10/2026 |
| 8.51.0 | 642 | 7/7/2026 |
| 8.50.0 | 1,586 | 6/25/2026 |
| 8.50.0-rc01 | 522 | 6/19/2026 |
| 8.49.1 | 637 | 6/10/2026 |
| 8.49.0 | 2,983 | 6/5/2026 |
| 8.48.1 | 2,411 | 6/2/2026 |
| 8.48.0 | 624 | 5/28/2026 |
| 8.47.3 | 901 | 5/26/2026 |