Morris.Moxy
Moxy - Mixins code generator for C#
Install / Use
/learn @mrpmorris/Morris.MoxyREADME
Morris.Moxy

Morris.Moxy is a code mix-in code generator for Microsoft .NET
Overview
Moxy allows you to write code templates at development time, which are then processed as Roslyn code-generators in real-time, and the results mixed-in to target classes.
Goal
- Write your code patterns once.
namespace {{ moxy.Class.Namespace }}
{
partial class {{ moxy.Class.Name}}
{
public string FullName => $"{Salutation} {GivenName} {FamilyName}"
public string Salutation { get; set; }
public string GivenName { get; set; }
public string FamilyName { get; set; }
}
}
- Moxy automatically creates a .Net attribute for each pattern, which you can then apply to multiple targets in your source code.
[PersonName]
public partial class Contact
{
}
- The Moxy Roslyn code-generator executes the code pattern to generate additional C# code
namespace MyApp
{
partial class Contact
{
public string FullName => $"{Salutation} {GivenName} {FamilyName}"
public string Salutation { get; set; }
public string GivenName { get; set; }
public string FamilyName { get; set; }
}
}
- Moxy is FAST. Changes to the template should reflect in the code in real-time. No need to recompile C# source code between changes.
Getting started
The easiest way to get started is to read the documentation.
Which includes tutorials that are numbered in an order recommended for learning
Morris.Moxy. Each will have a README file that explains how the tutorial was created.
Installation
You can download the latest release / pre-release NuGet packages from the official Morris.Moxy Nuget page
Release notes
See the Releases page for release history.
Licence
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
