MetaCode.TS3.Template.Immutables 3.0.40

.NET 6.0 .NET Standard 2.0
NuGet\Install-Package MetaCode.TS3.Template.Immutables -Version 3.0.40
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.
dotnet add package MetaCode.TS3.Template.Immutables --version 3.0.40
<PackageReference Include="MetaCode.TS3.Template.Immutables" Version="3.0.40" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MetaCode.TS3.Template.Immutables --version 3.0.40
#r "nuget: MetaCode.TS3.Template.Immutables, 3.0.40"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MetaCode.TS3.Template.Immutables as a Cake Addin
#addin nuget:?package=MetaCode.TS3.Template.Immutables&version=3.0.40

// Install MetaCode.TS3.Template.Immutables as a Cake Tool
#tool nuget:?package=MetaCode.TS3.Template.Immutables&version=3.0.40

Overview

A dotnet tool (mcts3) for model-first template-based code generation. Features built-in generators for producing source code for a variety of data model uses.

Features

  • Models can be defined in .NET assemblies or JSON.
  • Targetting .NET Standard 2.0 and .NET 6.0
  • In-the-box templates for generating:
    • ordinary mutable classes (POCOs);
    • immutable classes (with builders);
    • immutable classes based on C# records;
    • freezable classes;
    • serializable classes for Protobuf-Net, JSON and MessagePack;
    • shared interfaces for all the above.

Command-line use

TBD

  1. Get or create a model
  2. Choose a generator
  3. Generate!

Built-in Generators

Id Lang. Structure Mutability Serialization
Interfaces C# Flat Read-only
JsonPoco C# Flat Mutable JSON
Freezables C# Flat Freezable
Immutables C# Flat Immutable
Records C# 9 Flat Immutable
MsgPack C# Flat Mutable MessagePack
ProtbufNet3 C# Flat Mutable Protobuf.Net
Contracts C# Poly. Read-only
ClassesV2 C# Poly. Freezable
RecordsV2 C# 9 Poly. Immutable
MsgPackV2 C# Poly. Mutable MessagePack
MsgPackV3 C# Poly. Freezable MessagePack

Notes:

  • Read-only = client cannot invoke change;
  • Immutable = provider will never change data;
  • Freezable = mutable until frozen, then immutable.
  • Poly. = polymorphic i.e. supports inheritance.

Build your own generator

TBD

Under consideration

  • serialization for:
    • interoperable MessagePack
    • MsgPack.CLI
    • XSD
    • Bond
    • DataContract
    • polymorphic JSON
  • other languages;
  • SQL and EF
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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
3.0.40 83 9/18/2022
3.0.39 239 9/10/2022
3.0.38 51 8/29/2022
3.0.37 53 8/29/2022
3.0.36 50 8/29/2022
3.0.33 84 6/30/2022
3.0.30 72 6/4/2022
3.0.29 90 5/14/2022
3.0.26 85 5/6/2022
3.0.22 87 5/1/2022
3.0.20 87 4/29/2022
3.0.18 90 4/29/2022
3.0.14 87 4/29/2022
3.0.12 92 4/27/2022
3.0.11 105 4/13/2022
3.0.10 92 4/12/2022
3.0.9 95 4/11/2022
3.0.6 85 3/24/2022
3.0.5 83 3/22/2022
3.0.4 83 3/21/2022
1.2.1-beta 61 3/17/2022
1.1.3 97 3/16/2022
1.1.2 95 3/13/2022
1.1.1 92 3/9/2022
1.0.62 100 2/13/2022
1.0.59 86 2/11/2022
1.0.56 92 2/11/2022
1.0.53 112 1/13/2022
1.0.50 130 12/25/2021
1.0.46 115 12/22/2021
1.0.44 113 12/22/2021
1.0.43 115 12/21/2021
1.0.41 116 12/21/2021
1.0.40 133 11/28/2021
0.7.28 1,755 4/19/2021
0.5.25 387 12/21/2020