DTOMaker.Models.BinaryTree
1.8.1-dev
See the version list below for details.
dotnet add package DTOMaker.Models.BinaryTree --version 1.8.1-dev
NuGet\Install-Package DTOMaker.Models.BinaryTree -Version 1.8.1-dev
<PackageReference Include="DTOMaker.Models.BinaryTree" Version="1.8.1-dev" />
<PackageVersion Include="DTOMaker.Models.BinaryTree" Version="1.8.1-dev" />
<PackageReference Include="DTOMaker.Models.BinaryTree" />
paket add DTOMaker.Models.BinaryTree --version 1.8.1-dev
#r "nuget: DTOMaker.Models.BinaryTree, 1.8.1-dev"
#:package DTOMaker.Models.BinaryTree@1.8.1-dev
#addin nuget:?package=DTOMaker.Models.BinaryTree&version=1.8.1-dev&prerelease
#tool nuget:?package=DTOMaker.Models.BinaryTree&version=1.8.1-dev&prerelease
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:
- JSON (System.Text.Json)
- JSON (Newtonsoft.Json)
- MessagePack 2.x
- MemBlocks
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
Models are defined as C# interfaces with additional attributes. So let's start with a non-trivial model. Here's how to define a polymorphic, recursive tree type:
using DTOMaker.Models;
using DTOMaker.Runtime;
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; }
}
When you add a reference to the DTOMaker.SrcGen.JsonSystemText package, the implmentations will be generated in the MyModels.JsonSystemText namespace.
Development
In progress
- custom value type converters
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 | 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. |
-
.NETStandard 2.0
- DTOMaker.Models (>= 1.8.1-dev)
-
net10.0
- DTOMaker.Models (>= 1.8.1-dev)
-
net8.0
- DTOMaker.Models (>= 1.8.1-dev)
-
net9.0
- DTOMaker.Models (>= 1.8.1-dev)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.