DTOMaker.CLI
1.8.7
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global DTOMaker.CLI --version 1.8.7
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local DTOMaker.CLI --version 1.8.7
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DTOMaker.CLI&version=1.8.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package DTOMaker.CLI --version 1.8.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DTOMaker
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 | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.49 | 36 | 4/26/2026 |
| 2.0.48 | 44 | 4/25/2026 |
| 2.0.46-dev | 37 | 4/25/2026 |
| 2.0.45-dev | 90 | 4/16/2026 |
| 2.0.39-dev | 98 | 4/2/2026 |
| 2.0.38-dev | 92 | 3/31/2026 |
| 2.0.36-dev | 91 | 3/31/2026 |
| 2.0.29-dev | 102 | 3/17/2026 |
| 2.0.28-dev | 87 | 3/17/2026 |
| 2.0.26-dev | 89 | 3/15/2026 |
| 2.0.25-dev | 89 | 3/12/2026 |
| 2.0.24-dev | 91 | 3/7/2026 |
| 2.0.23-dev | 85 | 3/7/2026 |
| 2.0.20-dev | 90 | 3/5/2026 |
| 2.0.19-dev | 86 | 3/5/2026 |
| 2.0.18-dev | 86 | 3/5/2026 |
| 2.0.17-dev | 89 | 3/3/2026 |
| 2.0.16-dev | 88 | 3/3/2026 |
| 2.0.15-dev | 90 | 3/1/2026 |
| 1.8.7 | 114 | 1/26/2026 |
Loading failed