Rasmio.Corelib
10.6.3
dotnet add package Rasmio.Corelib --version 10.6.3
NuGet\Install-Package Rasmio.Corelib -Version 10.6.3
<PackageReference Include="Rasmio.Corelib" Version="10.6.3" />
<PackageVersion Include="Rasmio.Corelib" Version="10.6.3" />
<PackageReference Include="Rasmio.Corelib" />
paket add Rasmio.Corelib --version 10.6.3
#r "nuget: Rasmio.Corelib, 10.6.3"
#:package Rasmio.Corelib@10.6.3
#addin nuget:?package=Rasmio.Corelib&version=10.6.3
#tool nuget:?package=Rasmio.Corelib&version=10.6.3
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 |
Notifications (recommended)
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/ISmsSenderfromAddRasmioNotificationsover the static helpers.
License
| Product | Versions 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. |
-
net10.0
- Asp.Versioning.Mvc (>= 10.0.0)
- AspNetCore.HealthChecks.Rabbitmq (>= 9.0.0)
- AspNetCore.HealthChecks.Redis (>= 9.0.0)
- AspNetCore.HealthChecks.SqlServer (>= 9.0.0)
- AspNetCore.HealthChecks.UI (>= 9.0.0)
- AspNetCore.HealthChecks.UI.Client (>= 9.0.0)
- AspNetCore.HealthChecks.UI.InMemory.Storage (>= 9.0.0)
- AWSSDK.S3 (>= 4.0.101.3)
- brevo_csharp (>= 1.1.2)
- ClosedXML (>= 0.105.0)
- Dapper (>= 2.1.79)
- Elasticsearch.Net (>= 7.17.5)
- FluentResults (>= 4.0.0)
- FluentValidation (>= 12.1.1)
- Google.Protobuf (>= 3.35.1)
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.AspNetCore.Server.Reflection (>= 2.80.0)
- Hangfire.AspNetCore (>= 1.8.24)
- Hangfire.Core (>= 1.8.24)
- Hangfire.InMemory (>= 1.0.0)
- Hangfire.SqlServer (>= 1.8.24)
- IdeaTech.SemanticKernel.Connectors.Ollama (>= 1.0.3)
- KubernetesClient (>= 19.0.2)
- MassTransit (= 8.5.7)
- MassTransit.EntityFrameworkCore (= 8.5.7)
- MassTransit.RabbitMQ (= 8.5.7)
- MediatR (= 12.5.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.10)
- Microsoft.AspNetCore.DataProtection.StackExchangeRedis (>= 10.0.10)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.10)
- Microsoft.AspNetCore.OpenApi (>= 10.0.10)
- Microsoft.EntityFrameworkCore (>= 10.0.10)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.10)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 10.0.10)
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.SemanticKernel (>= 1.78.0)
- Microsoft.VisualStudio.Azure.Containers.Tools.Targets (>= 1.23.0)
- MongoDB.Bson (>= 3.10.0)
- MongoDB.Driver (>= 3.10.0)
- Neo4j.Driver (>= 6.2.1)
- NEST (>= 7.17.5)
- OpenGraph-Net (>= 4.0.1)
- OpenTelemetry (>= 1.17.0)
- OpenTelemetry.Exporter.Prometheus.AspNetCore (>= 1.16.0-beta.1)
- OpenTelemetry.Extensions.Hosting (>= 1.17.0)
- OpenTelemetry.Instrumentation.AspNetCore (>= 1.17.0)
- OpenTelemetry.Instrumentation.EntityFrameworkCore (>= 1.15.1-beta.1)
- OpenTelemetry.Instrumentation.Http (>= 1.17.0)
- OpenTelemetry.Instrumentation.Process (>= 1.15.1-beta.1)
- OpenTelemetry.Instrumentation.Runtime (>= 1.17.0)
- OpenTelemetry.Instrumentation.StackExchangeRedis (>= 1.15.1-beta.2)
- Polly (>= 8.7.0)
- RedisRateLimiting.AspNetCore (>= 1.2.1)
- RedLock.net (>= 2.3.2)
- RestSharp (>= 114.0.0)
- Scalar.AspNetCore (>= 2.16.15)
- Scrutor (>= 7.0.0)
- SendGrid (>= 9.29.3)
- Sentry.AspNetCore (>= 6.7.0)
- Sentry.DiagnosticSource (>= 6.7.0)
- Sentry.Extensions.Logging (>= 6.7.0)
- Sentry.Hangfire (>= 6.7.0)
- Sentry.OpenTelemetry (>= 6.7.0)
- Sentry.Profiling (>= 6.7.0)
- Serilog (>= 4.4.0)
- Serilog.Extensions.Hosting (>= 10.0.0)
- Serilog.Sinks.MSSqlServer (>= 10.0.0)
- Sieve (>= 2.5.5)
- Slack.NetStandard (>= 11.5.0)
- Swashbuckle.AspNetCore (>= 10.2.3)
- Swashbuckle.AspNetCore.SwaggerGen (>= 10.2.3)
- System.IdentityModel.Tokens.Jwt (>= 8.19.2)
- System.ServiceModel.Http (>= 10.0.652802)
- UAParser (>= 3.1.47)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.