DTOMaker.Runtime.MemBlocks 1.8.4

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

DTOMaker

Build-Deploy NuGet Version NuGet Downloads GitHub License GitHub Sponsors

Warning: This is pre-release software under active development. Breaking changes may occur.

Model-driven compile-time source generators for quickly creating polymorphic, freezable DTOs (Data Transport Objects) supporting various serialization protocols.

Features

  • Models defined via C# interfaces with attributes.
    • Source generators create implementations at compile time.
  • Properties can be basic .NET types such as integers, floats, strings, Guid.
    • Raw byte arrays are supported using the built-in Octets type.
    • Other common types such as DateTime, DateTimeOffset, TimeSpan are supported by built-in converters.
    • User-defined value types can be supported via user-defined converters to built-in types.
  • Nullable types.
  • Polymorphic types.
  • Freezability: DTO instances are mutable until frozen, after which they become immutable.
  • Serialization protocols:
    • JSON via System.Text.Json
    • JSON via Newtonsoft.Json
    • MessagePack 2.x
    • MemBlocks
  • Collections. Collections based on balanced binary trees are supported.

Example

using DTOMaker.Models;
namespace MyModels;
[Entity(1)] public interface INode : IEntityBase
{
    [Member(1)] String Key { get; set; } 
}
[Entity(2)] public interface IStringNode : INode
{
    [Member(1)] String Value { get; set; } 
}
[Entity(3)] public interface INumberNode : INode
{
    [Member(1)] Int64 Value  { get; set; } 
}
[Entity(4)] public interface ITree : IEntityBase
{
    [Member(1)] ITree? Left  { get; set; }
    [Member(2)] ITree? Right { get; set; }
    [Member(3)] INode? Node  { get; set; }
}

Workflow

flowchart TB
    def(Define models e.g. IMyDTO.cs)
    ref1(Reference DTOMaker.Models)
    ref2(Reference runtime e.g. DTOMaker.Runtime.JsonSystemText)
    ref3(Reference source generator e.g. DTOMaker.SrcGen.JsonSystemText)
    bld(Build/Run)
    ref1-->def
    def-->ref2
    ref2-->ref3
    ref3-->bld

Development

Coming soon

  • more custom (ref and value) type converters

Coming later

  • MessagePack 3.x serialization
  • Orleans serialization
  • Protobuf.Net serialization
  • model.json generation
  • command-line alternative
  • variant native type support
  • variable length arrays
  • logical value equality
  • common pattern extensions

How to sponsor

If you find these tools useful, please consider sponsoring my work on GitHub at https://github.com/sponsors/Psiman62 or buy me a coffee at https://www.buymeacoffee.com/psiman62

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
1.8.4 0 1/22/2026
1.8.1-dev 0 1/22/2026
1.7.25 76 1/19/2026
1.7.22 78 1/18/2026
1.7.20-dev 76 1/18/2026
1.7.18-dev 77 1/18/2026
1.7.8-dev 81 1/17/2026
1.7.1-dev 83 1/8/2026
1.6.12 85 1/6/2026
1.6.10 85 1/4/2026
1.6.2 87 1/3/2026
1.6.1 85 1/3/2026
1.5.23 87 1/1/2026
1.5.22-dev 83 1/1/2026
1.5.19-dev 84 1/1/2026
1.5.18-dev 100 12/28/2025
1.5.13-dev 93 12/27/2025
1.5.4-dev 137 12/26/2025
0.71.8 157 10/3/2025
0.71.7 305 9/19/2025
0.71.6 329 9/17/2025
0.71.5 325 9/16/2025
0.71.4 268 9/15/2025
0.71.3 264 9/15/2025
0.71.1 257 9/15/2025
0.70.3 191 9/9/2025
0.70.2 189 9/2/2025
0.70.1-dev 229 8/27/2025
0.69.10 172 8/17/2025
0.69.9 118 8/16/2025
0.69.8 193 8/13/2025
0.69.7-dev 188 8/13/2025
0.69.6-dev 179 8/12/2025
0.69.4-dev 154 8/9/2025
0.69.3-dev 98 7/19/2025
0.69.2-dev 100 7/19/2025
0.68.6 105 7/19/2025
0.68.5-dev 109 7/19/2025
0.68.2-dev 175 7/17/2025
0.68.1-dev 186 7/17/2025
0.67.7 186 7/17/2025
0.67.6-dev 187 7/9/2025
0.67.5-dev 180 7/9/2025
0.67.3-dev 181 7/7/2025
0.67.1-dev 330 6/10/2025
0.66.18 297 6/9/2025
0.66.17-dev 267 6/9/2025
0.66.16-dev 160 6/8/2025
0.66.14-dev 118 6/7/2025
0.66.13-dev 179 6/5/2025
0.66.10-dev 189 6/5/2025
0.66.9-dev 189 6/5/2025
0.66.8-dev 188 6/5/2025
0.66.7-dev 178 6/4/2025
0.66.2-dev 110 5/31/2025
0.65.20-generics-g24a665d336 107 5/31/2025
0.65.13-generics-ge74b19332f 198 4/23/2025
0.65.10-generics-g6f262eb134 233 4/17/2025
0.65.1-generics 117 5/31/2025
0.64.27 177 5/27/2025
0.64.26 251 5/16/2025
0.64.24 195 5/8/2025
0.64.22 202 4/23/2025
0.64.20 210 4/10/2025
0.64.18 208 4/10/2025
0.64.17 206 4/10/2025
0.64.16 208 4/9/2025
0.64.10 207 4/7/2025
0.64.9 171 4/4/2025
0.64.8-dev 199 4/1/2025
0.64.7-dev-g53a80ba3be 177 4/1/2025
0.64.5-dev-g449e36f771 535 3/25/2025
0.64.5-dev-g2fcf9bff64 192 4/1/2025
0.64.4-dev 193 4/1/2025
0.64.3-dev 199 3/31/2025
0.64.2-dev 525 3/25/2025
0.64.1-dev 531 3/25/2025
0.63.60-gee4d301e03 524 3/25/2025
0.63.19 152 3/21/2025
0.63.19-g2e909c64aa 142 3/21/2025
0.63.17 172 3/14/2025
0.63.16 172 3/14/2025
0.63.15 200 3/13/2025
0.63.13 213 3/11/2025
0.63.12 204 3/11/2025
0.63.11-dev 196 3/11/2025
0.63.9-dev 200 3/11/2025
0.63.8-dev 202 3/10/2025
0.63.7-dev 196 3/10/2025
0.63.6-dev 210 3/10/2025
0.63.3-dev 182 3/10/2025
0.62.10 267 3/8/2025
0.62.9 272 3/8/2025
0.62.7 261 3/7/2025
0.62.6-dev 244 3/7/2025
0.62.5-dev 250 3/7/2025
0.61.14 267 3/6/2025
0.61.13-dev 229 3/6/2025
0.61.12-dev 241 3/6/2025
0.61.10-dev 262 3/6/2025
0.61.9-dev 256 3/5/2025
0.61.8-dev 241 3/5/2025
0.61.5-dev 240 3/4/2025
0.61.3-dev 234 3/4/2025
0.61.2-dev 175 3/3/2025
0.60.8 168 2/27/2025
0.60.7 144 2/27/2025
0.60.6-dev 121 2/27/2025
0.60.3-dev 120 2/25/2025
0.59.10 164 2/19/2025
0.59.8-dev 144 2/19/2025
0.59.5-dev 142 2/17/2025
0.59.4-dev 137 2/15/2025
0.58.9 153 2/4/2025
0.58.8-dev 129 2/4/2025
0.57.6 161 2/1/2025
0.57.4 158 2/1/2025
0.57.2-dev 147 2/1/2025
0.57.1-dev 129 2/1/2025
0.56.13 155 1/31/2025
0.56.12-dev 134 1/31/2025
0.56.11-dev 133 1/30/2025
0.56.10-dev 137 1/30/2025
0.56.9-dev 141 1/30/2025
0.56.6-dev 127 1/24/2025
0.56.5-dev 141 1/24/2025
0.56.4-dev 129 1/24/2025
0.56.3-dev 127 1/24/2025
0.55.38 160 1/23/2025
0.55.37-dev 141 1/23/2025
0.55.36-dev 142 1/22/2025
0.55.34-dev 140 1/22/2025
0.55.32-dev 128 1/22/2025
0.55.31-dev 138 1/21/2025
0.55.30-dev 138 1/21/2025
0.55.29-dev 125 1/20/2025
0.55.27-dev 136 1/20/2025
0.55.25-dev 136 1/20/2025
0.55.24-dev 132 1/20/2025
0.55.23-dev 126 1/19/2025
0.55.20-dev 125 1/19/2025
0.55.17-dev 124 1/19/2025
0.55.14-dev 122 1/19/2025
0.54.2 160 1/3/2025
0.54.1-dev 144 1/3/2025
0.53.4 168 1/1/2025
0.53.3 153 1/1/2025
0.53.2 171 12/31/2024
0.53.1-dev 125 12/31/2024
0.52.1 152 12/31/2024
0.51.1 136 12/31/2024
0.50.2 146 12/31/2024
0.50.1-dev 112 12/31/2024
0.49.7 142 12/31/2024
0.49.6 156 12/29/2024
0.49.5-dev 135 12/29/2024
0.49.4-dev 144 12/29/2024