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
scopeIClassThe scope in which the attribute is refined
attributeIAttributeThe refined attribute
contextITransformationContextThe 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
generatedTypeCodeTypeDeclarationThe generated code type declaration
elementTypeCodeTypeReferenceThe element type reference
standardValuesRefCodeExpressionA reference to the standard values field
implementingAttributesList<IAttribute>The attributes implementing the collection
constraintValuesList<string>The constraints that apply to the reference
contextITransformationContextThe 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
generatedTypeCodeTypeDeclarationThe generated code type declaration
elementTypeCodeTypeReferenceThe element tyoe reference
standardValuesRefCodeExpressionA reference to the standard values field
implementingAttributesList<IAttribute>The attributes implementing the collection
constraintValuesList<string>The constraints that apply to the attribute
contextITransformationContextThe context in which the collection is implemented
ImplementNotifiable(CodeTypeDeclaration, CodeTypeReference)
Implement the IEnumerableExpression interface
protected virtual void ImplementNotifiable(CodeTypeDeclaration generatedType, CodeTypeReference elementType)
Parameters
generatedTypeCodeTypeDeclarationThe generated code type declaration
elementTypeCodeTypeReferenceThe 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
generatedTypeCodeTypeDeclarationThe generated type
implementingAttributesList<IAttribute>The attributes that implemented the refined attribute
constructorCodeConstructorThe constructor of the class
constrParentRefCodeArgumentReferenceExpressionThe parent of the attribute collection class
contextITransformationContextThe 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
scopeIClassThe scope in which the attribute is refined
attributeIAttributeThe attribute that is refined
generatedTypeCodeTypeDeclarationThe generated code declaration
contextITransformationContextThe transformation context