Autogenerated by MFractor v3.2.13

Create AttributeUsage Annotation

Configuration Id: com.mfractor.code_gen.csharp.attribute_usage_annotation

Create an [System.AttributeUsage()] annotation that can can be attached to a class declaration that derives from System.Attribute.

Create Base Constructor

Configuration Id: com.mfractor.code_gen.csharp.base_constructor

Generates a class constructor that routes a series of constructor parameters into a base(...) constructor.


Create Class Declaration

Configuration Id: com.mfractor.code_gen.csharp.class_declaration

Generates a new class declaration implementing all provided members, base class constructors, base class abstract invocations and interfaces

Configurable Properties

Name Type Defaults To Description
ImplementBaseConstructors System.Boolean False Should the base class constructors be automatically created?


Create Constructor

Configuration Id: com.mfractor.code_gen.csharp.constructor

Generates a class constructor, optionally with a set of arguments.

Configurable Properties

Name Type Defaults To Description
ArgumentFirstLetterToLowerCase System.Boolean True Should all constructor arguments have their first letter forced to lower case?

Generate Assignment Expression

Configuration Id: com.mfractor.code_gen.csharp.assignment_expression

Generates an assignment expresssion; eg this.myField = value;

Configurable Properties

Name Type Defaults To Description
IncludeThisForMembers System.Boolean False When assigning to a class member, should a this. be added to the variable being assigned?

Generate Event Handler Declaration

Configuration Id: com.mfractor.code_gen.csharp.event_handler_declaration

Generates an event EventHandler<EventArgs> declaration that can be bound against by a callback.

Generate Event Handler Method Callback

Configuration Id: com.mfractor.code_gen.csharp.event_handler_method

Generates a method that's compatible for registration with an EventHandler<EventArgs> as a callback.

Generate Instance Property

Configuration Id: com.mfractor.code_gen.csharp.instance_property

Generates a instance property with a getter and setter.

Configurable Properties

Name Type Defaults To Description
UseBackingFields System.Boolean False When creating the implementation for a property with a public getter and setter, should the property generator create a backing field?


Generate Member Initialiser

Configuration Id: com.mfractor.code_gen.csharp.member_initialiser_expression

Generates an initilisation expression for a class/struct member (such as a property or field).

Configurable Properties

Name Type Defaults To Description
ForceStringLiteral System.Boolean False Should the code generator always attempt to assign members with a string literal?

Member Field Generator

Configuration Id: com.mfractor.code_gen.csharp.field_declaration

Generates member field declarations with an optional value initialisation

Configurable Properties

Name Type Defaults To Description
UnderscoreOnBackingField System.Boolean False When creating a backing field for a property, should the field have an underscore appended to the start of the field name?


Method Generator

Configuration Id: com.mfractor.code_gen.csharp.method_declaration

Generates a new method declaration

Configurable Properties

Name Type Defaults To Description
UseExplicitInterfaceImplementation System.Boolean False When generating a method for an interface, should the new method be explicitly qualified against the interface? EG: 'void MyInterface.MyMethod'
IncludeNotImplementException System.Boolean False When creating the new method body, should a NotImplementedException be thrown as the default code body?

Namespace Declaration

Configuration Id: com.mfractor.code_gen.csharp.namespace_declaration

Generates a new namespace declaration syntax element

Using Directive Generator

Configuration Id: com.mfractor.code_gen.csharp.using_directive

Generates a new using directive for the provided namespace