Rasmio.Corelib 10.6.3

dotnet add package Rasmio.Corelib --version 10.6.3
                    
NuGet\Install-Package Rasmio.Corelib -Version 10.6.3
                    
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="Rasmio.Corelib" Version="10.6.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rasmio.Corelib" Version="10.6.3" />
                    
Directory.Packages.props
<PackageReference Include="Rasmio.Corelib" />
                    
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 Rasmio.Corelib --version 10.6.3
                    
#r "nuget: Rasmio.Corelib, 10.6.3"
                    
#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 Rasmio.Corelib@10.6.3
                    
#: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=Rasmio.Corelib&version=10.6.3
                    
Install as a Cake Addin
#tool nuget:?package=Rasmio.Corelib&version=10.6.3
                    
Install as a Cake Tool

Rasmio.Corelib

Shared infrastructure library for Rasmio services. It bundles the cross-cutting building blocks used across our ASP.NET Core apps — notifications (SMS/email), rate limiting, JWT / API-key security, CQRS + MediatR behaviors, object storage, and a set of integration helpers — behind a small number of IServiceCollection extension methods.

Targets .NET 10 (net10.0).

Install

dotnet add package Rasmio.Corelib

Configuration

The library ships no appsettings.json; every secret and setting is supplied by the consuming application's configuration (appsettings.json, environment variables, user secrets, key vault, …). No credentials are compiled into the assembly.

Each module binds its own configuration section. The main ones:

Module Entry point Config section
Notifications (SMS/email, multi-provider) AddRasmioNotifications(IConfiguration) Notifications
Legacy helpers (StaticHelpers, PayPing) AddRasmioLegacyHelpers(IConfiguration) RasmioLegacyHelpers
JWT authentication AddJWTAutentication(IConfiguration) SecuritySettings
Rate limiting AddRateLimiting(IConfiguration) see RateLimit/README.md

The modern, DI-first notification module. Register it and inject IEmailSender / ISmsSender:

builder.Services.AddRasmioNotifications(builder.Configuration);
{
  "Notifications": {
    "ActiveSmsProviders": [ "Asiatech", "Kavenegar" ],
    "ActiveEmailProviders": [ "Smtp" ],
    "Sms": {
      "Kavenegar": { "ApiKey": "<key>" },
      "Asiatech":  { "AuthorizationHeader": "Basic <base64>", "SourceAddress": "9890004043" }
    },
    "Email": {
      "SendGrid": { "ApiKey": "SG.xxxx" },
      "Smtp":     { "Host": "smtp.example.com", "Port": 587, "Username": "u", "Password": "p" }
    }
  }
}

Legacy static helpers

Rasmio.Corelib.Helpers.StaticHelpers (SMS/email/Bale) and the PayPing payment transport predate the notification module and expose static methods. They now read their credentials from configuration instead of hardcoded values. Wire them once at startup:

builder.Services.AddRasmioLegacyHelpers(builder.Configuration);
{
  "RasmioLegacyHelpers": {
    "AsiatechAuthorizationHeader": "Basic <base64 of user:pass>",
    "AsiatechSourceAddress": "9890004043",
    "KavenegarApiKey": "<kavenegar-key>",
    "SendGridApiKey": "SG.xxxx",
    "BaleBotToken": "1337708678:xxxx",
    "BaleDefaultChatId": 1463410933,
    "BaleSafirApiAccessKey": "xxxx",
    "BaleSafirBotId": 502457471,
    "PayPingToken": "xxxx"
  }
}

In containers/cloud you can skip appsettings.json entirely and set environment variables using the standard double-underscore convention — these are read even without calling AddRasmioLegacyHelpers:

RasmioLegacyHelpers__KavenegarApiKey=...
RasmioLegacyHelpers__SendGridApiKey=...
RasmioLegacyHelpers__PayPingToken=...

User-facing helpers (SMSAsync, AsiatechOTP, SMSToArray, Email, SendBaleOTPAsync) throw a clear InvalidOperationException when a required secret is missing; the fire-and-forget BaleAsync diagnostic alert silently no-ops when its bot token is not configured.

New code should prefer IEmailSender / ISmsSender from AddRasmioNotifications over the static helpers.

License

MIT

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.

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.6.3 0 7/19/2026
10.6.2 19 7/19/2026
10.6.1 32 7/19/2026
10.6.0 28 7/19/2026