KamiSama.ExternalServices.Sms.Core
11.0.0.2
dotnet add package KamiSama.ExternalServices.Sms.Core --version 11.0.0.2
NuGet\Install-Package KamiSama.ExternalServices.Sms.Core -Version 11.0.0.2
<PackageReference Include="KamiSama.ExternalServices.Sms.Core" Version="11.0.0.2" />
<PackageVersion Include="KamiSama.ExternalServices.Sms.Core" Version="11.0.0.2" />
<PackageReference Include="KamiSama.ExternalServices.Sms.Core" />
paket add KamiSama.ExternalServices.Sms.Core --version 11.0.0.2
#r "nuget: KamiSama.ExternalServices.Sms.Core, 11.0.0.2"
#:package KamiSama.ExternalServices.Sms.Core@11.0.0.2
#addin nuget:?package=KamiSama.ExternalServices.Sms.Core&version=11.0.0.2
#tool nuget:?package=KamiSama.ExternalServices.Sms.Core&version=11.0.0.2
KamiSama.ExternalServices.Sms.Core
Version: 10.0.0
Description
Provider-selecting SMS registration for ASP.NET Core applications, including default-provider options and a scoped mock provider. Use it to route unkeyed ISendSms calls to scoped keyed providers.
How to use
dotnet add package KamiSama.ExternalServices.Sms.Core --version 10.0.0
Version 10.0.0 in the install command is the current workspace/root documentation version. This package version was not published at the time of review; when installing from NuGet, replace it with a version that is actually available.
Add the core module with a configuration section whose sms value is exactly mock, kavenegar, or neo-zarin. Add the selected provider module, then build through the extended builder; merely calling an Add*Module method does not run module service registration:
using KamiSama.ExternalServices.Sms;
using KamiSama.Modules;
var webBuilder = WebApplication.CreateBuilder(args);
var builder = webBuilder.Extend()
.AddSmsCoreServicesModule(webBuilder.Configuration.GetSection("SmsDefaults"));
var app = await builder.BuildAsync(CancellationToken.None);
The core module registers a scoped unkeyed ISendSms dispatcher and the scoped keyed mock implementation. Provider packages register scoped keyed implementations under kavenegar and neo-zarin; application code normally injects unkeyed ISendSms. The mock logs method entry and does not deliver a message.
Runtime caveats: an unknown configured key actually fails in GetRequiredKeyedService with InvalidOperationException; the following null check and CannotFindExternalServiceException are not reached. The dispatcher returns the provider task without awaiting it, so only exceptions thrown synchronously while invoking the provider are wrapped as InvalidResponseForExternalServiceException; exceptions faulting the returned task are not logged or wrapped. HttpExceptionBase exceptions and cancellation behavior remain provider-specific.
Namespaces
- KamiSama.ExternalServices.Sms (3 types)
Types
- KamiSama.ExternalServices.Sms.ExtendedWebApplicationBuilderExtensions - Adds core SMS provider selection, the unkeyed dispatcher, and the keyed
mockregistration to anExtendedWebApplicationBuilder. CallBuildorBuildAsyncto apply the module registrations. - KamiSama.ExternalServices.Sms.SmsCoreServicesModule - Registers the scoped unkeyed SMS dispatcher, scoped keyed
mockprovider, and default-provider options. Its registrations run when the containingExtendedWebApplicationBuilderis built. - KamiSama.ExternalServices.Sms.SmsDefaultsOptions - Selects the scoped keyed provider used by the unkeyed SMS dispatcher. The exact keys supplied by these packages are
mock,kavenegar, andneo-zarin.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- KamiSama.Extensions.DependencyInjection (>= 11.0.0.2)
- KamiSama.Extensions.Logging (>= 11.0.0.2)
- KamiSama.ExternalServices.Exceptions (>= 11.0.0.2)
- KamiSama.ExternalServices.Sms.Abstractions (>= 11.0.0.2)
- KamiSama.Modules (>= 11.0.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0.2 | 91 | 11/23/2026 |
| 11.0.0.1 | 104 | 11/21/2026 |
| 10.0.14 | 103 | 11/8/2026 |
| 10.0.13.1 | 108 | 10/22/2026 |
| 10.0.13 | 110 | 10/22/2026 |
| 10.0.11.9 | 154 | 8/24/2026 |
| 10.0.11.8 | 126 | 8/21/2026 |
| 10.0.11.7 | 132 | 8/21/2026 |
| 10.0.11.6 | 132 | 8/19/2026 |
| 10.0.11.5 | 124 | 8/18/2026 |
| 10.0.11.4 | 135 | 8/18/2026 |
| 10.0.11.3 | 125 | 8/18/2026 |
| 10.0.11.2 | 132 | 8/18/2026 |
| 10.0.11.1 | 146 | 8/15/2026 |
| 10.0.11 | 147 | 8/11/2026 |
| 10.0.10.2 | 133 | 8/4/2026 |