Class Namespace
The default implementation of the Namespace class
[XmlNamespace("http://nmf.codeplex.com/nmeta/")]
[XmlNamespacePrefix("nmeta")]
[ModelRepresentationClass("http://nmf.codeplex.com/nmeta/#//Namespace")]
public class Namespace : MetaElement, INamespace, IMetaElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Namespace
- Implements
- Inherited Members
- Extension Methods
Constructors
Namespace()
Creates a new instance
public Namespace()
Properties
ChildNamespaces
The ChildNamespaces property
[Browsable(false)]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("ParentNamespace")]
public ICollectionExpression<INamespace> ChildNamespaces { get; }
Property Value
Children
Gets the child model elements of this model element
public override IEnumerableExpression<IModelElement> Children { get; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
ParentNamespace
The ParentNamespace property
[Browsable(false)]
[XmlAttribute(true)]
[XmlOpposite("ChildNamespaces")]
public INamespace ParentNamespace { get; set; }
Property Value
Prefix
The Prefix property
[XmlAttribute(true)]
public string Prefix { get; set; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Types
The Types property
[Browsable(false)]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("Namespace")]
public ICollectionExpression<IType> Types { get; }
Property Value
Uri
The Uri property
[XmlAttribute(true)]
public Uri Uri { get; set; }
Property Value
Methods
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
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
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe 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
objectThe 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
stringThe 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
stringThe 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
Returns
- IModelElement
The model element or null if it could not be found
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
IModelElementThe new parent model element
oldParent
IModelElementThe 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
IModelElementThe new parent model element
oldParent
IModelElementThe old parent model element
OnParentNamespaceChanged(ValueChangedEventArgs)
Raises the ParentNamespaceChanged event
protected virtual void OnParentNamespaceChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgs
ValueChangedEventArgsThe event data
OnParentNamespaceChanging(ValueChangedEventArgs)
Raises the ParentNamespaceChanging event
protected virtual void OnParentNamespaceChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgs
ValueChangedEventArgsThe event data
OnPrefixChanged(ValueChangedEventArgs)
Raises the PrefixChanged event
protected virtual void OnPrefixChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgs
ValueChangedEventArgsThe event data
OnPrefixChanging(ValueChangedEventArgs)
Raises the PrefixChanging event
protected virtual void OnPrefixChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgs
ValueChangedEventArgsThe event data
OnUriChanged(ValueChangedEventArgs)
Raises the UriChanged event
protected virtual void OnUriChanged(ValueChangedEventArgs eventArgs)
Parameters
eventArgs
ValueChangedEventArgsThe event data
OnUriChanging(ValueChangedEventArgs)
Raises the UriChanging event
protected virtual void OnUriChanging(ValueChangedEventArgs eventArgs)
Parameters
eventArgs
ValueChangedEventArgsThe event data
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)
Parameters
Events
ParentNamespaceChanged
Gets fired when the ParentNamespace property changed its value
public event EventHandler<ValueChangedEventArgs> ParentNamespaceChanged
Event Type
ParentNamespaceChanging
Gets fired before the ParentNamespace property changes its value
public event EventHandler<ValueChangedEventArgs> ParentNamespaceChanging
Event Type
PrefixChanged
Gets fired when the Prefix property changed its value
public event EventHandler<ValueChangedEventArgs> PrefixChanged
Event Type
PrefixChanging
Gets fired before the Prefix property changes its value
public event EventHandler<ValueChangedEventArgs> PrefixChanging
Event Type
UriChanged
Gets fired when the Uri property changed its value
public event EventHandler<ValueChangedEventArgs> UriChanged
Event Type
UriChanging
Gets fired before the Uri property changes its value
public event EventHandler<ValueChangedEventArgs> UriChanging