Class Meta2ClassesTransformation.RefinedAttributeCollectionClassGenerator
The transformation rule that generates a collection class for a refined attribute
public class Meta2ClassesTransformation.RefinedAttributeCollectionClassGenerator : TransformationRule<IClass, IAttribute, CodeTypeDeclaration>
- Inheritance
-
Meta2ClassesTransformation.RefinedAttributeCollectionClassGenerator
- Inherited Members
Methods
CreateOutput(IClass, IAttribute, ITransformationContext)
Creates the uninitialized transformation rule output
public override CodeTypeDeclaration CreateOutput(IClass scope, IAttribute attribute, ITransformationContext context)
Parameters
scope
IClassThe scope in which the attribute is refined
attribute
IAttributeThe refined attribute
context
ITransformationContextThe transformation context
Returns
- CodeTypeDeclaration
The uninitialized code type declaration
ImplementCollection(CodeTypeDeclaration, CodeTypeReference, CodeExpression, List<IAttribute>, List<string>, ITransformationContext)
Implements the ICollection interface
protected virtual void ImplementCollection(CodeTypeDeclaration generatedType, CodeTypeReference elementType, CodeExpression standardValuesRef, List<IAttribute> implementingAttributes, List<string> constraintValues, ITransformationContext context)
Parameters
generatedType
CodeTypeDeclarationThe generated code type declaration
elementType
CodeTypeReferenceThe element type reference
standardValuesRef
CodeExpressionA reference to the standard values field
implementingAttributes
List<IAttribute>The attributes implementing the collection
constraintValues
List<string>The constraints that apply to the reference
context
ITransformationContextThe context in which the collection is implemented
ImplementList(CodeTypeDeclaration, CodeTypeReference, CodeExpression, List<IAttribute>, List<string>, ITransformationContext)
Implements the IList interface
protected virtual void ImplementList(CodeTypeDeclaration generatedType, CodeTypeReference elementType, CodeExpression standardValuesRef, List<IAttribute> implementingAttributes, List<string> constraintValues, ITransformationContext context)
Parameters
generatedType
CodeTypeDeclarationThe generated code type declaration
elementType
CodeTypeReferenceThe element tyoe reference
standardValuesRef
CodeExpressionA reference to the standard values field
implementingAttributes
List<IAttribute>The attributes implementing the collection
constraintValues
List<string>The constraints that apply to the attribute
context
ITransformationContextThe context in which the collection is implemented
ImplementNotifiable(CodeTypeDeclaration, CodeTypeReference)
Implement the IEnumerableExpression interface
protected virtual void ImplementNotifiable(CodeTypeDeclaration generatedType, CodeTypeReference elementType)
Parameters
generatedType
CodeTypeDeclarationThe generated code type declaration
elementType
CodeTypeReferenceThe element type reference
ImplementNotifications(CodeTypeDeclaration, List<IAttribute>, CodeConstructor, CodeArgumentReferenceExpression, ITransformationContext)
Implement notifications on the given generated type
protected virtual void ImplementNotifications(CodeTypeDeclaration generatedType, List<IAttribute> implementingAttributes, CodeConstructor constructor, CodeArgumentReferenceExpression constrParentRef, ITransformationContext context)
Parameters
generatedType
CodeTypeDeclarationThe generated type
implementingAttributes
List<IAttribute>The attributes that implemented the refined attribute
constructor
CodeConstructorThe constructor of the class
constrParentRef
CodeArgumentReferenceExpressionThe parent of the attribute collection class
context
ITransformationContextThe context in which the request is made
Transform(IClass, IAttribute, CodeTypeDeclaration, ITransformationContext)
Initializes the generated collection class for the refined attribute
public override void Transform(IClass scope, IAttribute attribute, CodeTypeDeclaration generatedType, ITransformationContext context)
Parameters
scope
IClassThe scope in which the attribute is refined
attribute
IAttributeThe attribute that is refined
generatedType
CodeTypeDeclarationThe generated code declaration
context
ITransformationContextThe transformation context