Class EventGenerator<T>
Represents a transformation rule that is used to generate events
Inheritance
EventGenerator<T>
Inherited Members
Namespace: NMF.CodeGen
Assembly: NMF.CodeGen.dll
Syntax
public abstract class EventGenerator<T> : TransformationRule<T, CodeMemberEvent> where T : class
Type Parameters
Name | Description |
---|---|
T | The type of the model elements from which to generate events |
Methods
| Edit this page View SourceCreateOutput(T, ITransformationContext)
Creates the output event for the given input model element
Declaration
public override CodeMemberEvent CreateOutput(T input, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
T | input | The input model element |
ITransformationContext | context | The transformation context |
Returns
Type | Description |
---|---|
CodeMemberEvent | The transformation output uninitialized |
Overrides
NMF.Transformations.TransformationRule<T, System.CodeDom.CodeMemberEvent>.CreateOutput(T, NMF.Transformations.Core.ITransformationContext)
|
Edit this page
View Source
GetEventArgsType(T, ITransformationContext)
Gets the type reference to the event arguments data class
Declaration
protected abstract CodeTypeReference GetEventArgsType(T input, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
T | input | The input model element |
ITransformationContext | context | The transformation context |
Returns
Type | Description |
---|---|
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
Declaration
protected abstract string GetName(T input)
Parameters
Type | Name | Description |
---|---|---|
T | input | The input model element from which to generate the event |
Returns
Type | Description |
---|---|
string | The name of the event |
Transform(T, CodeMemberEvent, ITransformationContext)
Initializes the output event
Declaration
public override void Transform(T input, CodeMemberEvent output, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
T | input | The input model element |
CodeMemberEvent | output | The output model element |
ITransformationContext | context | The transformation context |