Table of Contents

Class EventGenerator<T>

Namespace
NMF.CodeGen
Assembly
NMF.CodeGen.dll

Represents a transformation rule that is used to generate events

public abstract class EventGenerator<T> : TransformationRule<T, CodeMemberEvent> where T : class

Type Parameters

T

The type of the model elements from which to generate events

Inheritance
EventGenerator<T>
Derived
Inherited Members

Methods

CreateOutput(T, ITransformationContext)

Creates the output event for the given input model element

public override CodeMemberEvent CreateOutput(T input, ITransformationContext context)

Parameters

input T

The input model element

context ITransformationContext

The transformation context

Returns

CodeMemberEvent

The transformation output uninitialized

GetEventArgsType(T, ITransformationContext)

Gets the type reference to the event arguments data class

protected abstract CodeTypeReference GetEventArgsType(T input, ITransformationContext context)

Parameters

input T

The input model element

context ITransformationContext

The transformation context

Returns

CodeTypeReference

A reference to the used event args class or null. If null, the default class used is System.EventArgs

GetName(T)

Gets the name of the event

protected abstract string GetName(T input)

Parameters

input T

The input model element from which to generate the event

Returns

string

The name of the event

Transform(T, CodeMemberEvent, ITransformationContext)

Initializes the output event

public override void Transform(T input, CodeMemberEvent output, ITransformationContext context)

Parameters

input T

The input model element

output CodeMemberEvent

The output model element

context ITransformationContext

The transformation context