Table of Contents

Class Meta2ClassesTransformation.RefinedAttributeCollectionClassGenerator

Namespace
NMF.Models.Meta
Assembly
NMF.Models.MetaTransformation.dll

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 IClass

The scope in which the attribute is refined

attribute IAttribute

The refined attribute

context ITransformationContext

The 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 CodeTypeDeclaration

The generated code type declaration

elementType CodeTypeReference

The element type reference

standardValuesRef CodeExpression

A 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 ITransformationContext

The 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 CodeTypeDeclaration

The generated code type declaration

elementType CodeTypeReference

The element tyoe reference

standardValuesRef CodeExpression

A 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 ITransformationContext

The context in which the collection is implemented

ImplementNotifiable(CodeTypeDeclaration, CodeTypeReference)

Implement the IEnumerableExpression interface

protected virtual void ImplementNotifiable(CodeTypeDeclaration generatedType, CodeTypeReference elementType)

Parameters

generatedType CodeTypeDeclaration

The generated code type declaration

elementType CodeTypeReference

The 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 CodeTypeDeclaration

The generated type

implementingAttributes List<IAttribute>

The attributes that implemented the refined attribute

constructor CodeConstructor

The constructor of the class

constrParentRef CodeArgumentReferenceExpression

The parent of the attribute collection class

context ITransformationContext

The 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 IClass

The scope in which the attribute is refined

attribute IAttribute

The attribute that is refined

generatedType CodeTypeDeclaration

The generated code declaration

context ITransformationContext

The transformation context