DKNet.Svc.Transformation 13.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package DKNet.Svc.Transformation --version 13.3.1
                    
NuGet\Install-Package DKNet.Svc.Transformation -Version 13.3.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="DKNet.Svc.Transformation" Version="13.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DKNet.Svc.Transformation" Version="13.3.1" />
                    
Directory.Packages.props
<PackageReference Include="DKNet.Svc.Transformation" />
                    
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 DKNet.Svc.Transformation --version 13.3.1
                    
#r "nuget: DKNet.Svc.Transformation, 13.3.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 DKNet.Svc.Transformation@13.3.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=DKNet.Svc.Transformation&version=13.3.1
                    
Install as a Cake Addin
#tool nuget:?package=DKNet.Svc.Transformation&version=13.3.1
                    
Install as a Cake Tool

DKNet.Svc.Transformation

Fills bracketed tokens in a template string ([Name] by default; {Email}, <Amount> and {{Ref}} are opt-in) from a plain object or string dictionary, with pluggable value formatting.

✨ Why use it?

  • Resolve every token in a template against one or more parameter sources in a single Transform/TransformAsync call — no string.Replace chains.
  • Use whatever data you already have: a DTO, an anonymous object, or a collection of objects. An IDictionary<string, string> resolves by key, case-insensitively, whether passed directly, inside a collection or in GlobalParameters.
  • Render numbers, dates, and booleans through a pluggable IValueFormatter instead of per-call formatting code.

🚀 Quick Start

Use a .NET 10 console project. Install the package, then replace Program.cs with the example.

dotnet new console -f net10.0 -n TransformDemo
cd TransformDemo
dotnet add package DKNet.Svc.Transformation
dotnet add package Microsoft.Extensions.DependencyInjection
using Microsoft.Extensions.DependencyInjection;
using DKNet.Svc.Transformation;

var services = new ServiceCollection();
services.AddTransformerService(); // ITransformerService, transient
var provider = services.BuildServiceProvider();

var transformer = provider.GetRequiredService<ITransformerService>();
var order = new { OrderId = 4711, Total = 129.5m };
Console.WriteLine(transformer.Transform("Order [OrderId] — [Total]", order));
// Order 4,711 — 129.50

Run with dotnet run.

Documentation

Guide Read when
Package overview Start with architecture and the end-to-end flow.
Fill a template from objects or dictionaries Resolve tokens against the call's own parameters, then GlobalParameters, and choose the not-found policy.
Choose token syntax Pick built-in bracket styles or define a custom token pair.
Format resolved values Control how bool/number/date values become display text.
Register the service Wire up AddTransformerService and configure GlobalParameters.
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
13.3.2 97 11/3/2026
13.3.1 107 10/26/2026
13.3.0 106 10/22/2026
13.2.8 106 10/22/2026
13.2.7 119 10/11/2026
13.2.6 104 10/10/2026
13.2.5 132 10/2/2026
13.2.4 102 10/1/2026
13.2.3 107 10/1/2026
13.2.2 107 10/1/2026
13.2.1 108 10/1/2026
13.2.0 102 10/1/2026
13.1.3 143 9/21/2026
13.1.2 109 9/18/2026
13.1.1 113 9/18/2026
13.1.0 112 9/18/2026
13.0.2 109 9/18/2026
13.0.1 102 9/18/2026
13.0.0 111 9/18/2026
12.0.0 110 9/17/2026
Loading failed