📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

MetaCode.TS3.Template.ClassesV2

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

MetaCode.TS3.Template.ClassesV2

C# template for model generated polymorphic records.

3.1.14
NuGet
Version published
Maintainers
1
Created
Source

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

  • Get or create a model
  • Choose a generator
  • Generate!

Built-in Generators

IdLang.StructureMutabilitySerialization
InterfacesC#FlatRead-only
JsonPocoC#FlatMutableJSON
FreezablesC#FlatFreezable
ImmutablesC#FlatImmutable
RecordsC# 9FlatImmutable
MsgPackC#FlatMutableMessagePack
ProtbufNet3C#FlatMutableProtobuf.Net
ContractsC#Poly.Read-only
ClassesV2C#Poly.Freezable
RecordsV2C# 9Poly.Immutable
MsgPackV2C#Poly.MutableMessagePack
MsgPackV3C#Poly.FreezableMessagePack

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

Keywords

MetaCode

FAQs

Package last updated on 02 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts