Show / Hide Table of Contents

Class NamedElementBase<TModelContract>

Base class for named elements.

Inheritance
System.Object
System.Dynamic.DynamicObject
ExpandoBase
Expando
NamedElementBase<TModelContract>
Annotation
ModelElementBase<TModelContract>
ModelProjection
Implements
INamedElement
IAggregatedElementInfo
IElementInfo
IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable
IAttributeProvider
Inherited Members
ExpandoBase.Item[String]
ExpandoBase.GetDynamicMemberNames()
ExpandoBase.HasDynamicMember(String)
ExpandoBase.TryGetMember(GetMemberBinder, Object)
ExpandoBase.TrySetMember(SetMemberBinder, Object)
ExpandoBase.TryInvokeMember(InvokeMemberBinder, Object[], Object)
ExpandoBase.ToDictionary(Func<String, String>, Func<Object, Object>)
ExpandoBase.GetInnerObjectTypeInfo()
ExpandoBase.GetThisTypeInfo()
ExpandoBase.TryGetValue(String, Object)
ExpandoBase.TrySetValue(String, Object)
System.Dynamic.DynamicObject.GetMetaObject(System.Linq.Expressions.Expression)
System.Dynamic.DynamicObject.TryBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Object, System.Object)
System.Dynamic.DynamicObject.TryConvert(System.Dynamic.ConvertBinder, System.Object)
System.Dynamic.DynamicObject.TryCreateInstance(System.Dynamic.CreateInstanceBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryDeleteIndex(System.Dynamic.DeleteIndexBinder, System.Object[])
System.Dynamic.DynamicObject.TryDeleteMember(System.Dynamic.DeleteMemberBinder)
System.Dynamic.DynamicObject.TryGetIndex(System.Dynamic.GetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryInvoke(System.Dynamic.InvokeBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TrySetIndex(System.Dynamic.SetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryUnaryOperation(System.Dynamic.UnaryOperationBinder, System.Object)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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 Source

NamedElementBase(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 Source

Logger

Gets the logger.

Declaration
protected readonly ILogger Logger
Field Value
Type Description
ILogger

Properties

| Improve this Doc View Source

Annotations

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.

| Improve this Doc View Source

ConstructionMonitor

Gets the construction monitor.

Declaration
protected InitializationMonitor<TModelContract> ConstructionMonitor { get; }
Property Value
Type Description
InitializationMonitor<TModelContract>

The construction monitor.

| Improve this Doc View Source

DeclaringContainer

Gets the container element.

Declaration
public virtual IModelElement DeclaringContainer { get; }
Property Value
Type Description
IModelElement

The container element.

| Improve this Doc View Source

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 Source

IsInherited

Gets or sets a value indicating whether this element is inherited.

Declaration
public bool IsInherited { get; protected set; }
Property Value
Type Description
System.Boolean

true if the model element is inherited, false if not.

| Improve this Doc View Source

ModelSpace

Gets the model space.

Declaration
public virtual IModelSpace ModelSpace { get; }
Property Value
Type Description
IModelSpace

The model space.

| Improve this Doc View Source

Name

Gets the name of the model element.

Declaration
public string Name { get; }
Property Value
Type Description
System.String

The model element name.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 &quot;@" discriminator, dimensions use "^", and projections use ":".

Methods

| Improve this Doc View Source

AddMember(INamedElement)

Adds the member to the members list.

Declaration
protected virtual void AddMember(INamedElement member)
Parameters
Type Name Description
INamedElement member

The member.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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
System.Object.ToString()

Explicit Interface Implementations

| Improve this Doc View Source

IAggregatedElementInfo.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.

| Improve this Doc View Source

IElementInfo.Annotations

Gets the element annotations.

Declaration
IEnumerable<object> IElementInfo.Annotations { get; }
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Object>

The element annotations.

| Improve this Doc View Source

IElementInfo.DeclaringContainer

Gets the parent element declaring this element.

Declaration
IElementInfo IElementInfo.DeclaringContainer { get; }
Returns
Type Description
IElementInfo

The declaring element.

Implements

INamedElement
IAggregatedElementInfo
IElementInfo
IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable
IAttributeProvider

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
RuntimeTypeInfoExtensions.IsExcludedFromModel(IAttributeProvider)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX