Class RuntimeModelInfoProviderBase<TProvider>
Base class for runtime model info providers.
Inheritance
Inherited Members
Namespace: Kephas.Model.Runtime
Assembly: Kephas.Model.dll
Syntax
public abstract class RuntimeModelInfoProviderBase<TProvider> : Loggable, ILoggable, IModelInfoProvider
Type Parameters
Name | Description |
---|---|
TProvider | The concrete provider type. |
Constructors
| Improve this Doc View SourceRuntimeModelInfoProviderBase(IRuntimeModelElementFactory)
Initializes a new instance of the RuntimeModelInfoProviderBase<TProvider> class.
Declaration
protected RuntimeModelInfoProviderBase(IRuntimeModelElementFactory runtimeModelElementFactory)
Parameters
Type | Name | Description |
---|---|---|
IRuntimeModelElementFactory | runtimeModelElementFactory | The runtime model information factory. |
Properties
| Improve this Doc View SourceRuntimeModelElementFactory
Gets the runtime model information factory.
Declaration
public IRuntimeModelElementFactory RuntimeModelElementFactory { get; }
Property Value
Type | Description |
---|---|
IRuntimeModelElementFactory | The runtime model information factory. |
Methods
| Improve this Doc View SourceGetElementInfosAsync(IModelConstructionContext, CancellationToken)
Gets the element infos used for building the model space.
Declaration
public Task<IEnumerable<IElementInfo>> GetElementInfosAsync(IModelConstructionContext constructionContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IModelConstructionContext | constructionContext | Context for the construction. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IElementInfo>> | An awaitable task promising an enumeration of element information. |
GetElementInfosCoreAsync(IModelConstructionContext, CancellationToken)
Gets the element infos used for building the model space (core implementation).
Declaration
protected abstract Task<IEnumerable<IElementInfo>> GetElementInfosCoreAsync(IModelConstructionContext constructionContext, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IModelConstructionContext | constructionContext | Context for the construction. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IElementInfo>> | An awaitable task promising an enumeration of element information. |
TryGetModelElementInfo(IElementInfo, IModelConstructionContext)
Tries to get an IElementInfo of the model space based on the provided native element information.
Declaration
public virtual IElementInfo TryGetModelElementInfo(IElementInfo nativeElementInfo, IModelConstructionContext constructionContext)
Parameters
Type | Name | Description |
---|---|---|
IElementInfo | nativeElementInfo | The native element information. |
IModelConstructionContext | constructionContext | Context for the construction. |
Returns
Type | Description |
---|---|
IElementInfo | The constructed generic type or |
Remarks
A return value of null
indicates only that the provided nativeElementInfo
cannot be handled.
For any other errors an exception should be thrown.