Dot0.SmsIr 10.0.1

dotnet add package Dot0.SmsIr --version 10.0.1
                    
NuGet\Install-Package Dot0.SmsIr -Version 10.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dot0.SmsIr" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dot0.SmsIr" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Dot0.SmsIr" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dot0.SmsIr --version 10.0.1
                    
#r "nuget: Dot0.SmsIr, 10.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dot0.SmsIr@10.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dot0.SmsIr&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Dot0.SmsIr&version=10.0.1
                    
Install as a Cake Tool

Dot0.SmsIr

Reusable .NET 10 sms.ir verification-template delivery with explicit real or fake registration. This package has no Axon or other Dot0 dependency.

Registration

using Dot0.SmsIr;

services.AddSmsIr(apiKey, useFake: false);

Inject ISmsIr and call SendVerifyAsync(mobileNumber, templateId, parameters, cancellationToken), supplying a numeric template ID and an IReadOnlyDictionary<string, string> of template parameters. Templates and application-specific OTP methods belong to the caller.

AddSmsIr registers a singleton and returns the named HTTP client builder for caller-owned customization. Real mode requires an API key during registration. The named client is SmsIr, targeting https://api.sms.ir/v1/send/verify. Credentials are attached to individual requests. The shared pool disables cookies, redirects and factory request logging. HTTP failures and response JSON errors propagate to the caller. No retries or additional provider-status policy is added.

Use AddSmsIr(null, useFake: true) for development. Fake delivery requires logging services, logs supplied template parameters and makes no HTTP requests. These parameters may contain verification codes. The fake completes immediately and does not observe cancellation; the real client passes cancellation to provider I/O.

Checks and publishing

Run dotnet run --project SmsIr.Client.Tests/SmsIr.Client.Tests.csproj --configuration Release for offline request, error propagation, cancellation and real/fake registration checks. No SMS messages are sent.

deploy-sms-ir.yml builds, checks, packs and publishes Dot0.SmsIr as 10.0.<GitHub run number>. It runs on branch deploy-sms-ir or by manual dispatch. Configure its NuGet Trusted Publishing policy and NUGET_USER using the repository setup. Local packages do not establish NuGet publication.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

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
10.0.1 39 11/18/2026