Morris.Moxy is a code mix-in code generator for Microsoft .NET
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.
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; }
}
}
[PersonName]
public partial class Contact
{
}
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; }
}
}
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.
You can download the latest release / pre-release NuGet packages from the official Morris.Moxy Nuget page
See the Releases page for release history.