Indice.Services
8.56.0
dotnet add package Indice.Services --version 8.56.0
NuGet\Install-Package Indice.Services -Version 8.56.0
<PackageReference Include="Indice.Services" Version="8.56.0" />
<PackageVersion Include="Indice.Services" Version="8.56.0" />
<PackageReference Include="Indice.Services" />
paket add Indice.Services --version 8.56.0
#r "nuget: Indice.Services, 8.56.0"
#:package Indice.Services@8.56.0
#addin nuget:?package=Indice.Services&version=8.56.0
#tool nuget:?package=Indice.Services&version=8.56.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 |
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/"
}
}
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 |
SmsServiceMstat |
services.AddSmsServiceMstat(configuration) |
ApiKey, SenderName |
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"
}
}
🔔 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.1)
- Azure.Storage.Queues (>= 12.27.1)
- Indice.Common (>= 8.56.0)
- MailKit (>= 4.17.0)
- Microsoft.AspNetCore.WebUtilities (>= 10.0.11)
- Microsoft.Azure.NotificationHubs (>= 4.2.0)
- Microsoft.Azure.SignalR.Management (>= 1.33.1)
- Microsoft.Extensions.Caching.Memory (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
- Microsoft.Extensions.Http (>= 10.0.11)
- 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.1)
- Azure.Storage.Queues (>= 12.27.1)
- Indice.Common (>= 8.56.0)
- MailKit (>= 4.17.0)
- Microsoft.AspNetCore.WebUtilities (>= 8.0.30)
- Microsoft.Azure.NotificationHubs (>= 4.2.0)
- Microsoft.Azure.SignalR.Management (>= 1.33.1)
- Microsoft.Extensions.Caching.Memory (>= 9.0.19)
- Microsoft.Extensions.Hosting (>= 9.0.19)
- Microsoft.Extensions.Http (>= 9.0.19)
- Microsoft.Extensions.Http.Resilience (>= 9.10.0)
-
net9.0
- Azure.Communication.Email (>= 1.1.0)
- Azure.Identity (>= 1.21.0)
- Azure.Messaging.ServiceBus (>= 7.20.2)
- Azure.Storage.Blobs (>= 12.29.1)
- Azure.Storage.Queues (>= 12.27.1)
- Indice.Common (>= 8.56.0)
- MailKit (>= 4.17.0)
- Microsoft.AspNetCore.WebUtilities (>= 9.0.19)
- Microsoft.Azure.NotificationHubs (>= 4.2.0)
- Microsoft.Azure.SignalR.Management (>= 1.33.1)
- Microsoft.Extensions.Caching.Memory (>= 9.0.19)
- Microsoft.Extensions.Hosting (>= 9.0.19)
- Microsoft.Extensions.Http (>= 9.0.19)
- 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.56.0 | 421 | 9/7/2026 |
| 8.55.0 | 461 | 9/3/2026 |
| 8.54.0 | 1,248 | 7/23/2026 |
| 8.53.0 | 680 | 7/21/2026 |
| 8.52.0 | 941 | 7/17/2026 |
| 8.51.1 | 579 | 7/10/2026 |
| 8.51.0 | 607 | 7/7/2026 |
| 8.50.0 | 1,283 | 6/25/2026 |
| 8.50.0-rc01 | 497 | 6/19/2026 |
| 8.49.1 | 583 | 6/10/2026 |
| 8.49.0 | 1,694 | 6/5/2026 |
| 8.48.1 | 1,882 | 6/2/2026 |
| 8.48.0 | 599 | 5/28/2026 |
| 8.47.3 | 815 | 5/26/2026 |
| 8.47.1 | 1,489 | 5/22/2026 |
| 8.47.0 | 872 | 5/14/2026 |
| 8.47.0-rc06 | 509 | 5/15/2026 |
| 8.47.0-rc05 | 494 | 5/14/2026 |
| 8.47.0-rc04 | 479 | 5/14/2026 |
| 8.47.0-rc03 | 495 | 5/14/2026 |