Class Attribute
Represents a simple-valued attribute
Implements
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.dll
Syntax
[XmlNamespace("http://nmf.codeplex.com/nmeta/")]
[XmlNamespacePrefix("nmeta")]
[ModelRepresentationClass("http://nmf.codeplex.com/nmeta/#//Attribute")]
public class Attribute : TypedElement, IAttribute, ITypedElement, IMetaElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Properties
| Edit this page View SourceClassInstance
Gets the Class model for this type
Declaration
public static IClass ClassInstance { get; }
Property Value
Type | Description |
---|---|
IClass |
DeclaringType
The type that declared this attribute
Declaration
[Browsable(false)]
[XmlAttribute(true)]
[XmlOpposite("Attributes")]
public IStructuredType DeclaringType { get; set; }
Property Value
Type | Description |
---|---|
IStructuredType |
DefaultValue
The default value for this attribute
Declaration
[XmlAttribute(true)]
public string DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
string |
ReferencedElements
Gets the referenced model elements of this model element
Declaration
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Type | Description |
---|---|
IEnumerableExpression<IModelElement> |
Overrides
| Edit this page View SourceRefines
Gets or sets the attribute that is implemented by the current attribute
Declaration
[XmlAttribute(true)]
public IAttribute Refines { get; set; }
Property Value
Type | Description |
---|---|
IAttribute |
Methods
| Edit this page View SourceGetAttributeValue(string, int)
Resolves the given attribute name
Declaration
protected override object GetAttributeValue(string attribute, int index)
Parameters
Type | Name | Description |
---|---|---|
string | attribute | The requested attribute name |
int | index | The index of this attribute |
Returns
Type | Description |
---|---|
object | The attribute value or null if it could not be found |
Overrides
| Edit this page View SourceGetClass()
Gets the Class for this model element
Declaration
public override IClass GetClass()
Returns
Type | Description |
---|---|
IClass |
Overrides
| Edit this page View SourceGetExpressionForAttribute(string)
Gets the property expression for the given attribute
Declaration
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
Type | Name | Description |
---|---|---|
string | attribute | The requested attribute in upper case |
Returns
Type | Description |
---|---|
INotifyExpression<object> | An incremental property expression |
Overrides
| Edit this page View SourceGetExpressionForReference(string)
Gets the property expression for the given reference
Declaration
protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)
Parameters
Type | Name | Description |
---|---|---|
string | reference | The requested reference in upper case |
Returns
Type | Description |
---|---|
INotifyExpression<IModelElement> | An incremental property expression |
Overrides
| Edit this page View SourceGetModelElementForReference(string, int)
Resolves the given URI to a child model element
Declaration
protected override IModelElement GetModelElementForReference(string reference, int index)
Parameters
Type | Name | Description |
---|---|---|
string | reference | The requested reference name |
int | index | The index of this reference |
Returns
Type | Description |
---|---|
IModelElement | The model element or null if it could not be found |
Overrides
| Edit this page View SourceOnDeclaringTypeChanged(ValueChangedEventArgs)
Raises the DeclaringTypeChanged event
Declaration
protected virtual void OnDeclaringTypeChanged(ValueChangedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | eventArgs | The event data |
OnDeclaringTypeChanging(ValueChangedEventArgs)
Raises the DeclaringTypeChanging event
Declaration
protected virtual void OnDeclaringTypeChanging(ValueChangedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | eventArgs | The event data |
OnDefaultValueChanged(ValueChangedEventArgs)
Raises the DefaultValueChanged event
Declaration
protected virtual void OnDefaultValueChanged(ValueChangedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | eventArgs | The event data |
OnDefaultValueChanging(ValueChangedEventArgs)
Raises the DefaultValueChanging event
Declaration
protected virtual void OnDefaultValueChanging(ValueChangedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | eventArgs | The event data |
OnParentChanged(IModelElement, IModelElement)
Gets called when the parent model element of the current model element changes
Declaration
protected override void OnParentChanged(IModelElement newParent, IModelElement oldParent)
Parameters
Type | Name | Description |
---|---|---|
IModelElement | newParent | The new parent model element |
IModelElement | oldParent | The old parent model element |
Overrides
| Edit this page View SourceOnParentChanging(IModelElement, IModelElement)
Gets called when the parent model element of the current model element is about to change
Declaration
protected override void OnParentChanging(IModelElement newParent, IModelElement oldParent)
Parameters
Type | Name | Description |
---|---|---|
IModelElement | newParent | The new parent model element |
IModelElement | oldParent | The old parent model element |
Overrides
| Edit this page View SourceOnRefinesChanged(ValueChangedEventArgs)
Raises the RefinesChanged event
Declaration
protected virtual void OnRefinesChanged(ValueChangedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | eventArgs | The event data |
OnRefinesChanging(ValueChangedEventArgs)
Raises the RefinesChanging event
Declaration
protected virtual void OnRefinesChanging(ValueChangedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventArgs | eventArgs | The event data |
SetFeature(string, object)
Sets a value to the given feature
Declaration
protected override void SetFeature(string feature, object value)
Parameters
Type | Name | Description |
---|---|---|
string | feature | The requested feature |
object | value | The value that should be set to that feature |
Overrides
Events
| Edit this page View SourceDeclaringTypeChanged
Gets fired when the DeclaringType property changed its value
Declaration
public event EventHandler<ValueChangedEventArgs> DeclaringTypeChanged
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs> |
DeclaringTypeChanging
Gets fired before the DeclaringType property changes its value
Declaration
public event EventHandler<ValueChangedEventArgs> DeclaringTypeChanging
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs> |
DefaultValueChanged
Gets fired when the DefaultValue property changed its value
Declaration
public event EventHandler<ValueChangedEventArgs> DefaultValueChanged
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs> |
DefaultValueChanging
Gets fired before the DefaultValue property changes its value
Declaration
public event EventHandler<ValueChangedEventArgs> DefaultValueChanging
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs> |
RefinesChanged
Gets fired when the Refines property changed its value
Declaration
public event EventHandler<ValueChangedEventArgs> RefinesChanged
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs> |
RefinesChanging
Gets fired before the Refines property changes its value
Declaration
public event EventHandler<ValueChangedEventArgs> RefinesChanging
Event Type
Type | Description |
---|---|
EventHandler<ValueChangedEventArgs> |