Table of Contents

Class Class

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

Represents a group of instances with common properties like attributes or references

[XmlNamespace("http://nmf.codeplex.com/nmeta/")]
[XmlNamespacePrefix("nmeta")]
[ModelRepresentationClass("http://nmf.codeplex.com/nmeta/#//Class")]
public class Class : ReferenceType, IClass, IReferenceType, IStructuredType, IType, IMetaElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
Class
Implements
Inherited Members
Extension Methods

Constructors

Class()

Creates a new instance

public Class()

Properties

AttributeConstraints

The AttributeConstraints property

[Browsable(false)]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("DeclaringType")]
public ICollectionExpression<IAttributeConstraint> AttributeConstraints { get; }

Property Value

ICollectionExpression<IAttributeConstraint>

BaseTypes

The BaseTypes property

[XmlAttribute(true)]
public ICollectionExpression<IClass> BaseTypes { get; }

Property Value

ICollectionExpression<IClass>

Children

Gets the child model elements of this model element

public override IEnumerableExpression<IModelElement> Children { get; }

Property Value

IEnumerableExpression<IModelElement>

ClassInstance

Gets the Class model for this type

public static IClass ClassInstance { get; }

Property Value

IClass

Identifier

Gets or sets the attribute that will identify instances of this class

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

Property Value

IAttribute

IdentifierScope

Specifies whether the identifier is valid only in the scope of its container or on a global scope.

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

Property Value

IdentifierScope

Remarks

This attribute is ignored when this class is not identified.

InstanceOf

The InstanceOf property

[XmlAttribute(true)]
public IClass InstanceOf { get; set; }

Property Value

IClass

IsAbstract

The IsAbstract property

[TypeConverter(typeof(LowercaseBooleanConverter))]
[XmlAttribute(true)]
public bool IsAbstract { get; set; }

Property Value

bool

ReferenceConstraints

The ReferenceConstraints property

[Browsable(false)]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("DeclaringType")]
public ICollectionExpression<IReferenceConstraint> ReferenceConstraints { get; }

Property Value

ICollectionExpression<IReferenceConstraint>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

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

GetCompositionName(object)

Gets the property name for the given container

protected override string GetCompositionName(object container)

Parameters

container object

The container object

Returns

string

The name of the respective container reference

GetExpressionForAttribute(string)

Gets the property expression for the given attribute

protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)

Parameters

attribute string

The requested attribute in upper case

Returns

INotifyExpression<object>

An incremental property expression

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

OnIdentifierChanged(ValueChangedEventArgs)

Raises the IdentifierChanged event

protected virtual void OnIdentifierChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnIdentifierChanging(ValueChangedEventArgs)

Raises the IdentifierChanging event

protected virtual void OnIdentifierChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnIdentifierScopeChanged(ValueChangedEventArgs)

Raises the IdentifierScopeChanged event

protected virtual void OnIdentifierScopeChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnIdentifierScopeChanging(ValueChangedEventArgs)

Raises the IdentifierScopeChanging event

protected virtual void OnIdentifierScopeChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnInstanceOfChanged(ValueChangedEventArgs)

Raises the InstanceOfChanged event

protected virtual void OnInstanceOfChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnInstanceOfChanging(ValueChangedEventArgs)

Raises the InstanceOfChanging event

protected virtual void OnInstanceOfChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnIsAbstractChanged(ValueChangedEventArgs)

Raises the IsAbstractChanged event

protected virtual void OnIsAbstractChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnIsAbstractChanging(ValueChangedEventArgs)

Raises the IsAbstractChanging event

protected virtual void OnIsAbstractChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

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

IdentifierChanged

Gets fired when the Identifier property changed its value

public event EventHandler<ValueChangedEventArgs> IdentifierChanged

Event Type

EventHandler<ValueChangedEventArgs>

IdentifierChanging

Gets fired before the Identifier property changes its value

public event EventHandler<ValueChangedEventArgs> IdentifierChanging

Event Type

EventHandler<ValueChangedEventArgs>

IdentifierScopeChanged

Gets fired when the IdentifierScope property changed its value

public event EventHandler<ValueChangedEventArgs> IdentifierScopeChanged

Event Type

EventHandler<ValueChangedEventArgs>

IdentifierScopeChanging

Gets fired before the IdentifierScope property changes its value

public event EventHandler<ValueChangedEventArgs> IdentifierScopeChanging

Event Type

EventHandler<ValueChangedEventArgs>

InstanceOfChanged

Gets fired when the InstanceOf property changed its value

public event EventHandler<ValueChangedEventArgs> InstanceOfChanged

Event Type

EventHandler<ValueChangedEventArgs>

InstanceOfChanging

Gets fired before the InstanceOf property changes its value

public event EventHandler<ValueChangedEventArgs> InstanceOfChanging

Event Type

EventHandler<ValueChangedEventArgs>

IsAbstractChanged

Gets fired when the IsAbstract property changed its value

public event EventHandler<ValueChangedEventArgs> IsAbstractChanged

Event Type

EventHandler<ValueChangedEventArgs>

IsAbstractChanging

Gets fired before the IsAbstract property changes its value

public event EventHandler<ValueChangedEventArgs> IsAbstractChanging

Event Type

EventHandler<ValueChangedEventArgs>