Table of Contents

Class Namespace

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

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

ICollectionExpression<INamespace>

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

ParentNamespace

The ParentNamespace property

[Browsable(false)]
[XmlAttribute(true)]
[XmlOpposite("ChildNamespaces")]
public INamespace ParentNamespace { get; set; }

Property Value

INamespace

Prefix

The Prefix property

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

Property Value

string

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

Types

The Types property

[Browsable(false)]
[XmlAttribute(false)]
[Containment]
[XmlOpposite("Namespace")]
public ICollectionExpression<IType> Types { get; }

Property Value

ICollectionExpression<IType>

Uri

The Uri property

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

Property Value

Uri

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

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

OnParentNamespaceChanged(ValueChangedEventArgs)

Raises the ParentNamespaceChanged event

protected virtual void OnParentNamespaceChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnParentNamespaceChanging(ValueChangedEventArgs)

Raises the ParentNamespaceChanging event

protected virtual void OnParentNamespaceChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnPrefixChanged(ValueChangedEventArgs)

Raises the PrefixChanged event

protected virtual void OnPrefixChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnPrefixChanging(ValueChangedEventArgs)

Raises the PrefixChanging event

protected virtual void OnPrefixChanging(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnUriChanged(ValueChangedEventArgs)

Raises the UriChanged event

protected virtual void OnUriChanged(ValueChangedEventArgs eventArgs)

Parameters

eventArgs ValueChangedEventArgs

The event data

OnUriChanging(ValueChangedEventArgs)

Raises the UriChanging event

protected virtual void OnUriChanging(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

ParentNamespaceChanged

Gets fired when the ParentNamespace property changed its value

public event EventHandler<ValueChangedEventArgs> ParentNamespaceChanged

Event Type

EventHandler<ValueChangedEventArgs>

ParentNamespaceChanging

Gets fired before the ParentNamespace property changes its value

public event EventHandler<ValueChangedEventArgs> ParentNamespaceChanging

Event Type

EventHandler<ValueChangedEventArgs>

PrefixChanged

Gets fired when the Prefix property changed its value

public event EventHandler<ValueChangedEventArgs> PrefixChanged

Event Type

EventHandler<ValueChangedEventArgs>

PrefixChanging

Gets fired before the Prefix property changes its value

public event EventHandler<ValueChangedEventArgs> PrefixChanging

Event Type

EventHandler<ValueChangedEventArgs>

UriChanged

Gets fired when the Uri property changed its value

public event EventHandler<ValueChangedEventArgs> UriChanged

Event Type

EventHandler<ValueChangedEventArgs>

UriChanging

Gets fired before the Uri property changes its value

public event EventHandler<ValueChangedEventArgs> UriChanging

Event Type

EventHandler<ValueChangedEventArgs>