Table of Contents

Class Comment

Namespace
NMF.Interop.Legacy.Cmof
Assembly
NMF.UMLInterop.dll

A comment is a textual annotation that can be attached to a set of elements. A comment gives the ability to attach various remarks to elements. A comment carries no semantic force, but may contain information that is useful to a modeler. A comment may be owned by any element.

[AlternativeNamespace("http://schema.omg.org/spec/mof/2.0/emof.xmi")]
[XmlNamespace("http://schema.omg.org/spec/MOF/2.0/cmof.xml")]
[XmlNamespacePrefix("cmof")]
[ModelRepresentationClass("http://schema.omg.org/spec/MOF/2.0/cmof.xml#//Comment")]
public class Comment : Element, IComment, IElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
Inheritance
Comment
Implements
Inherited Members

Constructors

Comment()

Creates a new instance

public Comment()

Properties

AnnotatedElement

References the Element(s) being commented.

[XmlElementName("annotatedElement")]
[XmlAttribute(true)]
public ISetExpression<IElement> AnnotatedElement { get; }

Property Value

ISetExpression<IElement>

Body

Specifies a string that is the comment.

[XmlElementName("body")]
[XmlAttribute(true)]
public string Body { get; set; }

Property Value

string

ClassInstance

Gets the Class model for this type

public static IClass ClassInstance { get; }

Property Value

IClass

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

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

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