Show / Hide Table of Contents

Class NamedElementConstructorBase<TModel, TModelContract, TRuntime>

Base implementation of a named element information provider based on the .NET runtime.

Inheritance
System.Object
NamedElementConstructorBase<TModel, TModelContract, TRuntime>
AnnotationConstructorBase<TAnnotation, TAttribute>
ModelElementConstructorBase<TModel, TModelContract, TRuntime>
Implements
IRuntimeModelElementConstructor<TModel, TModelContract, TRuntime>
IRuntimeModelElementConstructor
Inherited Members
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)
System.Object.ToString()
Namespace: Kephas.Model.Runtime.Construction
Assembly: Kephas.Model.dll
Syntax
public abstract class NamedElementConstructorBase<TModel, TModelContract, TRuntime> : IRuntimeModelElementConstructor<TModel, TModelContract, TRuntime>, IRuntimeModelElementConstructor where TModel : NamedElementBase<TModelContract> where TModelContract : class, INamedElement where TRuntime : class
Type Parameters
Name Description
TModel

Type of the model.

TModelContract

Type of the model contract.

TRuntime

Type of the runtime definition.

Properties

| Improve this Doc View Source

ElementNameDiscriminator

Gets the element name discriminator.

Declaration
protected virtual string ElementNameDiscriminator { get; }
Property Value
Type Description
System.String

The element name discriminator.

Remarks

This dicriminator can be used as a suffix in the name to identify the element type.

Methods

| Improve this Doc View Source

CanCreateModelElement(IModelConstructionContext, TRuntime)

Determines whether a model element can be created for the provided runtime element.

Declaration
protected virtual bool CanCreateModelElement(IModelConstructionContext constructionContext, TRuntime runtimeElement)
Parameters
Type Name Description
IModelConstructionContext constructionContext

Context for the construction.

TRuntime runtimeElement

The runtime element.

Returns
Type Description
System.Boolean

true if a model element can be created, false if not.

| Improve this Doc View Source

ConstructModelElementContent(IModelConstructionContext, TRuntime, TModel)

Constructs the model element content.

Declaration
protected virtual void ConstructModelElementContent(IModelConstructionContext constructionContext, TRuntime runtimeElement, TModel element)
Parameters
Type Name Description
IModelConstructionContext constructionContext

Context for the construction.

TRuntime runtimeElement

The runtime element.

TModel element

The element being constructed.

| Improve this Doc View Source

TryComputeName(IModelConstructionContext, Object)

Tries to compute the name for the provided runtime element.

Declaration
public string TryComputeName(IModelConstructionContext constructionContext, object runtimeElement)
Parameters
Type Name Description
IModelConstructionContext constructionContext

Context for the construction.

System.Object runtimeElement

The runtime element.

Returns
Type Description
System.String

A string containing the name, or null if the name could not be computed.

| Improve this Doc View Source

TryComputeNameCore(Object)

Computes the model element name based on the runtime element.

Declaration
protected virtual string TryComputeNameCore(object runtimeElement)
Parameters
Type Name Description
System.Object runtimeElement

The runtime element.

Returns
Type Description
System.String

The element name, or null if the name could not be computed.

| Improve this Doc View Source

TryCreateModelElement(IModelConstructionContext, Object)

Tries to create an element information structure based on the provided runtime element information.

Declaration
public virtual INamedElement TryCreateModelElement(IModelConstructionContext constructionContext, object runtimeElement)
Parameters
Type Name Description
IModelConstructionContext constructionContext

Context for the construction.

System.Object runtimeElement

The runtime element.

Returns
Type Description
INamedElement

A new element information based on the provided runtime element information, or null if the runtime element information is not supported.

| Improve this Doc View Source

TryCreateModelElementCore(IModelConstructionContext, TRuntime)

Core implementation of trying to get the element information.

Declaration
protected abstract TModel TryCreateModelElementCore(IModelConstructionContext constructionContext, TRuntime runtimeElement)
Parameters
Type Name Description
IModelConstructionContext constructionContext

Context for the construction.

TRuntime runtimeElement

The runtime element.

Returns
Type Description
TModel

A new element information based on the provided runtime element information, or null if the runtime element information is not supported.

Implements

IRuntimeModelElementConstructor<TModel, TModelContract, TRuntime>
IRuntimeModelElementConstructor

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)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX