Class NamedElementBase<TModelContract>
Base class for named elements.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Model.Elements
Assembly: Kephas.Model.dll
Syntax
public abstract class NamedElementBase<TModelContract> : Expando, INamedElement, IAggregatedElementInfo, IElementInfo, IExpando, IDynamicMetaObjectProvider, IIndexable, IAttributeProvider, IConstructibleElement where TModelContract : INamedElement
Type Parameters
Name | Description |
---|---|
TModelContract | The type of the model contract (the interface). |
Constructors
| Improve this Doc View SourceNamedElementBase(IModelConstructionContext, String)
Initializes a new instance of the NamedElementBase<TModelContract> class.
Declaration
protected NamedElementBase(IModelConstructionContext constructionContext, string name)
Parameters
Type | Name | Description |
---|---|---|
IModelConstructionContext | constructionContext | Context for the construction. |
System.String | name | The model element name. |
Fields
| Improve this Doc View SourceLogger
Gets the logger.
Declaration
protected readonly ILogger Logger
Field Value
Type | Description |
---|---|
ILogger |
Properties
| Improve this Doc View SourceAnnotations
Gets the annotations of this model element.
Declaration
public abstract IEnumerable<IAnnotation> Annotations { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IAnnotation> | The model element annotations. |
ConstructionMonitor
Gets the construction monitor.
Declaration
protected InitializationMonitor<TModelContract> ConstructionMonitor { get; }
Property Value
Type | Description |
---|---|
InitializationMonitor<TModelContract> | The construction monitor. |
DeclaringContainer
Gets the container element.
Declaration
public virtual IModelElement DeclaringContainer { get; }
Property Value
Type | Description |
---|---|
IModelElement | The container element. |
FullName
Gets the fully qualified name, starting from the root model space.
Declaration
public string FullName { get; }
Property Value
Type | Description |
---|---|
System.String | The fully qualified name. |
Remarks
The fully qualified name is built up of qualified names separated by "/".
Examples
/: identifies the root model space.
/^AppLayer: identifies the AppLayer dimension.
/:Primitives:Kephas:Core:Main:Global/String: identifies the String classifier within the :Primitives:Kephas:Core:Main:Global projection.
/:MyModel:MyCompany:Contacts:Main:Domain/Contact/Name: identifies the Name member of the Contact classifier within the :MyModel:MyCompany:Contacts:Main:Domain projection.
/:MyModel:MyCompany:Contacts:Main:Domain/Contact/Name/@Required: identifies the Required attribute of the Name member of the Contact classifier within the :MyModel:MyCompany:Contacts:Main:Domain projection.
| Improve this Doc View SourceIsInherited
Gets or sets a value indicating whether this element is inherited.
Declaration
public bool IsInherited { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ModelSpace
Gets the model space.
Declaration
public virtual IModelSpace ModelSpace { get; }
Property Value
Type | Description |
---|---|
IModelSpace | The model space. |
Name
Gets the name of the model element.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The model element name. |
Parts
Gets the parts of an aggregated element.
Declaration
protected IEnumerable<object> Parts { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | The parts. |
QualifiedFullName
Gets or sets the qualified name of the element.
Declaration
public string QualifiedFullName { get; protected set; }
Property Value
Type | Description |
---|---|
System.String | The qualified name of the element. |
Remarks
The qualified name is unique within the container's members. Some elements have the qualified name the same as their name, but others will use a discriminator prefix to avoid name collisions. For example, annotations use the "@" discriminator, dimensions use "^", and projections use ":".
Methods
| Improve this Doc View SourceAddMember(INamedElement)
Adds the member to the members list.
Declaration
protected virtual void AddMember(INamedElement member)
Parameters
Type | Name | Description |
---|---|---|
INamedElement | member | The member. |
AddPart(Object)
Adds a part to the aggregated element.
Declaration
protected virtual void AddPart(object part)
Parameters
Type | Name | Description |
---|---|---|
System.Object | part | The part to be added. |
GetAttributes<TAttribute>()
Gets the attribute of the provided type.
Declaration
public virtual IEnumerable<TAttribute> GetAttributes<TAttribute>()
where TAttribute : Attribute
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TAttribute> | The attribute of the provided type. |
Type Parameters
Name | Description |
---|---|
TAttribute | Type of the attribute. |
OnCompleteConstruction(IModelConstructionContext)
Called when the construction is complete.
Declaration
protected virtual void OnCompleteConstruction(IModelConstructionContext constructionContext)
Parameters
Type | Name | Description |
---|---|---|
IModelConstructionContext | constructionContext | Context for the construction. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIAggregatedElementInfo.Parts
Gets the parts of an aggregated element.
Declaration
IEnumerable<object> IAggregatedElementInfo.Parts { get; }
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | The parts. |
IElementInfo.Annotations
Gets the element annotations.
Declaration
IEnumerable<object> IElementInfo.Annotations { get; }
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | The element annotations. |
IElementInfo.DeclaringContainer
Gets the parent element declaring this element.
Declaration
IElementInfo IElementInfo.DeclaringContainer { get; }
Returns
Type | Description |
---|---|
IElementInfo | The declaring element. |