Class EventGenerator<T>
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
TThe input model element
context
ITransformationContextThe 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
TThe input model element
context
ITransformationContextThe 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
TThe 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
TThe input model element
output
CodeMemberEventThe output model element
context
ITransformationContextThe transformation context