-
Notifications
You must be signed in to change notification settings - Fork 30
Code Generation Snippets
Jeff Ward edited this page Nov 26, 2022
·
1 revision
This page is a collection of snippets commonly used in code generation. This is a 'Work in Progress'. Eventually this page will be extracted and moved to a more organized location. The 'default insert text' is intentional and meant to serve as a formatting guideline for adding new snippets.
PropertyGenerator.Create(new ArrowExpressionProperty(
"MyProperty",
typeof(int),
Statement.Expression.Invoke("Set", generics: new[] { CustomType.Create("Student") }).AsExpression(),
new List<Modifiers> { Modifiers.Public, Modifiers.Virtual })
Will generate:
public virtual int MyProperty => Set<Student>();