RossWright.MetalCore.Server
2026.1.1
dotnet add package RossWright.MetalCore.Server --version 2026.1.1
NuGet\Install-Package RossWright.MetalCore.Server -Version 2026.1.1
<PackageReference Include="RossWright.MetalCore.Server" Version="2026.1.1" />
<PackageVersion Include="RossWright.MetalCore.Server" Version="2026.1.1" />
<PackageReference Include="RossWright.MetalCore.Server" />
paket add RossWright.MetalCore.Server --version 2026.1.1
#r "nuget: RossWright.MetalCore.Server, 2026.1.1"
#:package RossWright.MetalCore.Server@2026.1.1
#addin nuget:?package=RossWright.MetalCore.Server&version=2026.1.1
#tool nuget:?package=RossWright.MetalCore.Server&version=2026.1.1
Ross Wright's Metal Core Server Library
Copyright (c) 2023-2026 Pross Co.
Table of Contents
Messaging
The Server package provides an abstraction framework for messaging that decouples application code from delivery implementations. Application code depends only on IEmailService or ISmsService; switching to a different delivery provider requires only a registration change in Program.cs — no changes to handlers or services.
Currently provided: SMTP via AddSmtpEmailService(). SendGrid and Twilio integrations were previously available as separate packages and may return in a future release.
// Program.cs
builder.AddSmtpEmailService();
// Handler
await emailService.Send(new AddressedEmail {
Subject = "Welcome",
ToRecipients = [new EmailRecipient { Email = user.Email }],
TextBody = "Thanks for signing up."
});
Messaging Contracts
RossWright.Messaging namespace.
| Type | Description |
|---|---|
IMessageContent |
Base content contract; exposes TextBody |
IEmailContent |
Extends IMessageContent with Subject and optional HtmlBody |
IAddressedEmail |
Extends IEmailContent with ToRecipients, CcRecipients, BccRecipients |
IEmailRecipient |
Contract for a single email address: Name? and Email |
EmailRecipient |
Concrete IEmailRecipient |
AddressedEmail |
Concrete IAddressedEmail |
IEmailService |
Send(IAddressedEmail) — abstracts email delivery |
IAddressedSmsMessage |
Extends IMessageContent with Recipients |
ISmsRecipient |
Contract for a single SMS recipient: PhoneNumber |
ISmsService |
Send(IAddressedSmsMessage) — abstracts SMS delivery |
ISmsServiceExtensions |
Convenience overloads for sending to a phone number, single recipient, or from IMessageContent |
SMTP Email
RossWright.Messaging.Smtp namespace.
Bind configuration from appsettings.json under the "MetalCore.Smtp" section.
Authenticated relay (Gmail, SendGrid SMTP, AWS SES SMTP, etc.):
"MetalCore.Smtp": {
"Host": "smtp.example.com",
"Port": 587,
"EnableSsl": true,
"FromEmail": "no-reply@example.com",
"FromName": "My App",
"Username": "smtp-user",
"Password": "smtp-password"
}
Unauthenticated relay (internal mail relay, local dev SMTP server, etc.) — omit Username and Password:
"MetalCore.Smtp": {
"Host": "relay.internal",
"Port": 25,
"EnableSsl": false,
"FromEmail": "no-reply@example.com",
"FromName": "My App"
}
When Username and Password are both present and non-empty, the client sets SmtpClient.Credentials to a NetworkCredential before sending. When either is absent, the client sends without credentials.
| Type / Method | Description |
|---|---|
SmtpConfig |
Configuration model: Host, Port, FromEmail, FromName, EnableSsl, Username?, Password? |
AddSmtpEmailService(builder, configSection?) |
Registers IEmailService as a singleton SMTP service, binding config from appsettings |
AddSmtpEmailService(builder, SmtpConfig) |
Registers IEmailService from a pre-built SmtpConfig |
AddSmtpEmailService(builder, Action<SmtpConfig>, configSection?) |
Registers IEmailService after binding config and applying a post-bind delegate |
SMS: No concrete
ISmsServiceimplementation is provided in this package. Register your own implementation againstISmsService.
App Builder Fluent Syntax
MetalCore provides extension methods on WebApplicationBuilder and WebApplication that enable a single fluent chain from CreateBuilder(args) through to Run(), eliminating the intermediate variable assignments that standard ASP.NET Core startup requires.
WebApplication.CreateBuilder(args)
.AddMetalInjection(_ => _.ScanThisAssembly())
.AddSmtpEmailService()
.AddServices((services, config) => services
.AddCors(...)
.AddSwaggerGen())
.Build()
.UseApp((app, config) => {
app.UseHttpsRedirection();
app.UseStaticFiles();
app.MapFallbackToFile("index.html");
})
.Run();
WebApplicationBuilder
| Method | Description | Example |
|---|---|---|
AddServices(Action<IServiceCollection>) |
Fluent wrapper for registering DI services | builder.AddServices(s => s.AddScoped<IFoo, Foo>()) |
AddServices(Action<IServiceCollection, IConfiguration>) |
Same, with access to IConfiguration |
builder.AddServices((s, cfg) => s.Configure<MyOpts>(cfg)) |
WebApplication
| Method | Description | Example |
|---|---|---|
UseApp(Action<WebApplication>) |
Fluent pipeline setup callback on a built WebApplication |
app.UseApp(a => a.UseHttpsRedirection()) |
UseApp(Action<WebApplication, IConfiguration>) |
Pipeline setup with access to IConfiguration |
app.UseApp((a, cfg) => ...) |
Installation
dotnet add package RossWright.MetalCore.Server
Or add directly to your project file:
<PackageReference Include="RossWright.MetalCore.Server" Version="*" />
See Also
| Package | Purpose |
|---|---|
RossWright.MetalCore |
Core extensions, utilities, options builders, load logging, exceptions, signing |
RossWright.MetalCore.Data |
Entity Framework extensions, GeoCoder, database timing interceptor |
RossWright.MetalCore.Blazor |
Blazor WASM utilities: local storage, JS script loader, host builder extensions |
RossWright.MetalCore.Populi |
Zero-dependency test-data generator: names, addresses, emails, coordinates, dates, prices, and lorem ipsum |
License
All Ross Wright Metal Libraries including this one are licensed under Apache License 2.0 with Commons Clause.
You are free to:
- Use the libraries in any project (personal or commercial)
- Modify them
- Include them in products or services you sell
You may not:
- Sell the libraries themselves (or any product/service whose primary value comes from the libraries)
- Repackage them with minimal changes and sell them as your own standalone product
Full legal text: LICENSE.md
| 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
- RossWright.MetalCore (>= 2026.1.1)
-
net8.0
- RossWright.MetalCore (>= 2026.1.1)
-
net9.0
- RossWright.MetalCore (>= 2026.1.1)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on RossWright.MetalCore.Server:
| Package | Downloads |
|---|---|
|
RossWright.MetalGuardian.Server
MetalGuardian Server-side |
|
|
RossWright.MetalNexus.Server
MetalNexus Server-side |
|
|
RossWright.MetalShout.Server
MetalShout Server-side |
|
|
RossWright.MetalGrind.Server
MetalGrind Server-side |
|
|
RossWright.MetalInquisition
MetalInquisition library |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2026.1.1 | 95 | 5/17/2026 | |
| 2026.1.0 | 99 | 5/14/2026 | |
| 2026.0.0 | 135 | 4/26/2026 | |
| 10.0.12 | 191 | 3/10/2026 | |
| 10.0.11 | 179 | 2/23/2026 | |
| 10.0.10 | 177 | 2/16/2026 | |
| 10.0.9 | 178 | 2/16/2026 | |
| 10.0.8 | 176 | 2/16/2026 | |
| 10.0.7 | 175 | 2/12/2026 | |
| 10.0.6 | 178 | 2/12/2026 | |
| 10.0.5 | 182 | 1/26/2026 | |
| 10.0.4 | 178 | 1/24/2026 | |
| 10.0.3 | 189 | 1/16/2026 | |
| 10.0.2 | 190 | 1/11/2026 | |
| 10.0.1 | 185 | 1/10/2026 | |
| 10.0.0 | 202 | 1/9/2026 | |
| 8.5.3 | 254 | 1/11/2026 | |
| 8.5.2 | 243 | 1/11/2026 | |
| 8.5.1 | 249 | 1/10/2026 | |
| 8.5.0 | 247 | 1/10/2026 |
[2026.1.1] - 5/17/2026
- Minor Fixes, additional Unit Tests and documentation.
[2026.1.0] - 5/13/2026
- Minor Fixes, additional Unit Tests and documentation.
[2026.0.0] - 4/26/2026
- Initial public release
** Prior versions released of this library were private and not intended for public use. Use version 2026.0.0 or later.**