Table of Contents

Class AttributeConstraint

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

The default implementation of the AttributeConstraint class

[XmlNamespace("http://nmf.codeplex.com/nmeta/")]
[XmlNamespacePrefix("nmeta")]
[ModelRepresentationClass("http://nmf.codeplex.com/nmeta/#//AttributeConstraint")]
public class AttributeConstraint : ModelElement, IAttributeConstraint, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
AttributeConstraint
Implements
Inherited Members
Extension Methods

Constructors

AttributeConstraint()

Creates a new instance

public AttributeConstraint()

Properties

ClassInstance

Gets the Class model for this type

public static IClass ClassInstance { get; }

Property Value

IClass

Constrains

The Constrains property

[XmlAttribute(true)]
public IAttribute Constrains { get; set; }

Property Value

IAttribute

DeclaringType

The DeclaringType property

[Browsable(false)]
[XmlAttribute(true)]
[XmlOpposite("AttributeConstraints")]
public IClass DeclaringType { get; set; }

Property Value

IClass

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Values

The Values property

[XmlAttribute(true)]
public IListExpression<string> Values { get; }

Property Value

IListExpression<string>

Methods

GetAttributeValue(string, int)

Resolves the given attribute name

protected override object GetAttributeValue(string attribute, int index)

Parameters

attribute string

The requested attribute name

index int

The index of this attribute

Returns

object

The attribute value or null if it could not be found

GetClass()

Gets the Class for this model element

public override IClass GetClass()

Returns

IClass

GetCollectionForFeature(string)

Gets the Model element collection for the given feature

protected override IList GetCollectionForFeature(string feature)

Parameters

feature string

The requested feature

Returns

IList

A non-generic list of elements

GetExpressionForReference(string)

Gets the property expression for the given reference

protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)

Parameters

reference string

The requested reference in upper case

Returns

INotifyExpression<IModelElement>

An incremental property expression

GetModelElementForReference(string, int)

Resolves the given URI to a child model element

protected override IModelElement GetModelElementForReference(string reference, int index)

Parameters

reference string

The requested reference name

index int

The index of this reference

Returns

IModelElement

The model element or null if it could not be found

OnConstrainsChanged(ValueChangedEventArgs)

Raises the ConstrainsChanged event

protected virtual void OnConstrainsChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnConstrainsChanging(ValueChangedEventArgs)

Raises the ConstrainsChanging event

protected virtual void OnConstrainsChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnDeclaringTypeChanged(ValueChangedEventArgs)

Raises the DeclaringTypeChanged event

protected virtual void OnDeclaringTypeChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnDeclaringTypeChanging(ValueChangedEventArgs)

Raises the DeclaringTypeChanging event

protected virtual void OnDeclaringTypeChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnParentChanged(IModelElement, IModelElement)

Gets called when the parent model element of the current model element changes

protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent)

Parameters

newParent IModelElement

The new parent model element

oldParent IModelElement

The old parent model element

OnParentChanging(IModelElement, IModelElement)

Gets called when the parent model element of the current model element is about to change

protected override void OnParentChanging(IModelElement newParent, IModelElement oldParent)

Parameters

newParent IModelElement

The new parent model element

oldParent IModelElement

The old parent model element

SetFeature(string, object)

Sets a value to the given feature

protected override void SetFeature(string feature, object value)

Parameters

feature string

The requested feature

value object

The value that should be set to that feature

Events

ConstrainsChanged

Gets fired when the Constrains property changed its value

public event EventHandler<ValueChangedEventArgs> ConstrainsChanged

Event Type

EventHandler<ValueChangedEventArgs>

ConstrainsChanging

Gets fired before the Constrains property changes its value

public event EventHandler<ValueChangedEventArgs> ConstrainsChanging

Event Type

EventHandler<ValueChangedEventArgs>

DeclaringTypeChanged

Gets fired when the DeclaringType property changed its value

public event EventHandler<ValueChangedEventArgs> DeclaringTypeChanged

Event Type

EventHandler<ValueChangedEventArgs>

DeclaringTypeChanging

Gets fired before the DeclaringType property changes its value

public event EventHandler<ValueChangedEventArgs> DeclaringTypeChanging

Event Type

EventHandler<ValueChangedEventArgs>