Show / Hide Table of Contents

Class DefaultAppManager

The default application manager.

Inheritance
System.Object
Loggable
DefaultAppManager
AspNetAppManager
Implements
ILoggable
IAppManager
Inherited Members
Loggable.Logger
Loggable.GetLogger()
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.Application
Assembly: Kephas.Application.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultAppManager : Loggable, ILoggable, IAppManager

Constructors

| Improve this Doc View Source

DefaultAppManager(IAppRuntime, ICompositionContext, IServiceBehaviorProvider, ICollection<IExportFactory<IAppLifecycleBehavior, AppServiceMetadata>>, ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>>, ICollection<IExportFactory<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>>)

Initializes a new instance of the DefaultAppManager class.

Declaration
public DefaultAppManager(IAppRuntime appRuntime, ICompositionContext compositionContext, IServiceBehaviorProvider serviceBehaviorProvider = null, ICollection<IExportFactory<IAppLifecycleBehavior, AppServiceMetadata>> appLifecycleBehaviorFactories = null, ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>> featureManagerFactories = null, ICollection<IExportFactory<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> featureLifecycleBehaviorFactories = null)
Parameters
Type Name Description
IAppRuntime appRuntime

The application runtime.

ICompositionContext compositionContext

The ambient services.

IServiceBehaviorProvider serviceBehaviorProvider

Optional. The service behavior provider.

System.Collections.Generic.ICollection<IExportFactory<IAppLifecycleBehavior, AppServiceMetadata>> appLifecycleBehaviorFactories

Optional. The application lifecycle behavior factories.

System.Collections.Generic.ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>> featureManagerFactories

Optional. The feature manager factories.

System.Collections.Generic.ICollection<IExportFactory<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> featureLifecycleBehaviorFactories

Optional. The feature lifecycle behavior factories.

Properties

| Improve this Doc View Source

AppLifecycleBehaviorFactories

Gets the application lifecycle behavior factories.

Declaration
public ICollection<IExportFactory<IAppLifecycleBehavior, AppServiceMetadata>> AppLifecycleBehaviorFactories { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<IExportFactory<IAppLifecycleBehavior, AppServiceMetadata>>

The application lifecycle behavior factories.

| Improve this Doc View Source

AppRuntime

Gets the application runtime.

Declaration
public IAppRuntime AppRuntime { get; }
Property Value
Type Description
IAppRuntime
| Improve this Doc View Source

CompositionContext

Gets the composition context.

Declaration
public ICompositionContext CompositionContext { get; }
Property Value
Type Description
ICompositionContext

The composition context.

| Improve this Doc View Source

FeatureLifecycleBehaviorFactories

Gets the feature lifecycle behavior factories.

Declaration
public ICollection<IExportFactory<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> FeatureLifecycleBehaviorFactories { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<IExportFactory<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>>

The feature lifecycle behavior factories.

| Improve this Doc View Source

FeatureManagerFactories

Gets the feature manager factories.

Declaration
public ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>> FeatureManagerFactories { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>>

The feature manager factories.

| Improve this Doc View Source

ServiceBehaviorProvider

Gets the service behavior provider.

Declaration
public IServiceBehaviorProvider ServiceBehaviorProvider { get; }
Property Value
Type Description
IServiceBehaviorProvider

Methods

| Improve this Doc View Source

AfterAppFinalizeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>>, IAppContext, CancellationToken)

Overridable method called after the application was finalized.

Declaration
protected virtual Task AfterAppFinalizeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors, IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

AfterAppInitializeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>>, IAppContext, CancellationToken)

Overridable method called after the application was initialized.

Declaration
protected virtual Task AfterAppInitializeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors, IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

AfterFeatureFinalizeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>>, IAppContext, FeatureManagerMetadata, CancellationToken)

Executes the after finalization behaviors.

Declaration
protected virtual Task AfterFeatureFinalizeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors, IAppContext appContext, FeatureManagerMetadata appServiceMetadata, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

FeatureManagerMetadata appServiceMetadata

The application service metadata.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

AfterFeatureInitializeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>>, IAppContext, FeatureManagerMetadata, CancellationToken)

Executes the after initialization behaviors.

Declaration
protected virtual Task AfterFeatureInitializeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors, IAppContext appContext, FeatureManagerMetadata appServiceMetadata, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

FeatureManagerMetadata appServiceMetadata

The application service metadata.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

BeforeAppFinalizeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>>, IAppContext, CancellationToken)

Overridable method called before actually finalizing the application.

Declaration
protected virtual Task BeforeAppFinalizeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors, IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

BeforeAppInitializeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>>, IAppContext, CancellationToken)

Overridable method called before actually initializing the application.

Declaration
protected virtual Task BeforeAppInitializeAsync(ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors, IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IAppLifecycleBehavior, AppServiceMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

BeforeFeatureFinalizeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>>, IAppContext, FeatureManagerMetadata, CancellationToken)

Executes the before finalization behaviors.

Declaration
protected virtual Task BeforeFeatureFinalizeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors, IAppContext appContext, FeatureManagerMetadata appServiceMetadata, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

FeatureManagerMetadata appServiceMetadata

The application service metadata.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

BeforeFeatureInitializeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>>, IAppContext, FeatureManagerMetadata, CancellationToken)

Executes the before initialization behaviors.

Declaration
protected virtual Task BeforeFeatureInitializeAsync(ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors, IAppContext appContext, FeatureManagerMetadata appServiceMetadata, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExport<IFeatureLifecycleBehavior, FeatureLifecycleBehaviorMetadata>> behaviors

The behaviors.

IAppContext appContext

Context for the application.

FeatureManagerMetadata appServiceMetadata

The application service metadata.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

ComputeDefaultFeatureInfo(FeatureManagerMetadata)

Calculates the feature information based on the FeatureManagerMetadata if not explicitely provided.

Declaration
protected virtual FeatureInfo ComputeDefaultFeatureInfo(FeatureManagerMetadata featureManagerMetadata)
Parameters
Type Name Description
FeatureManagerMetadata featureManagerMetadata

The feature manager metadata.

Returns
Type Description
FeatureInfo

The calculated feature information.

| Improve this Doc View Source

FinalizeAppAsync(IAppContext, CancellationToken)

Finalizes the application asynchronously.

Declaration
public virtual Task FinalizeAppAsync(IAppContext appContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

FinalizeFeatureAsync(IFeatureManager, IAppContext, CancellationToken)

Finalizes the feature asynchronously.

Declaration
protected virtual Task FinalizeFeatureAsync(IFeatureManager featureManager, IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
IFeatureManager featureManager

Manager for feature.

IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token (optional).

Returns
Type Description
System.Threading.Tasks.Task

The asynchronous result.

| Improve this Doc View Source

FinalizeFeaturesAsync(IAppContext, CancellationToken)

Invokes the finalization of feature managers asynchronously.

Declaration
protected virtual Task FinalizeFeaturesAsync(IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

InitializeAppAsync(IAppContext, CancellationToken)

Initializes the application asynchronously.

Declaration
public virtual Task InitializeAppAsync(IAppContext appContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token (optional).

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

InitializeFeatureAsync(IFeatureManager, IAppContext, CancellationToken)

Initializes the feature asynchronously.

Declaration
protected virtual Task InitializeFeatureAsync(IFeatureManager featureManager, IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
IFeatureManager featureManager

Manager for feature.

IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token (optional).

Returns
Type Description
System.Threading.Tasks.Task

The asynchronous result.

| Improve this Doc View Source

InitializeFeaturesAsync(IAppContext, CancellationToken)

Invokes the initialization of feature managers asynchronously.

Declaration
protected virtual Task InitializeFeaturesAsync(IAppContext appContext, CancellationToken cancellationToken)
Parameters
Type Name Description
IAppContext appContext

Context for the application.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task.

| Improve this Doc View Source

RemoveFailedAppRuntimeFeature(FeatureInfo)

Removes the failed feature from the application runtime.

Declaration
protected virtual void RemoveFailedAppRuntimeFeature(FeatureInfo featureInfo)
Parameters
Type Name Description
FeatureInfo featureInfo

Information describing the feature.

| Improve this Doc View Source

SetAppRuntimeFeatures(IList<FeatureInfo>)

Sets the features in the application runtime.

Declaration
protected virtual void SetAppRuntimeFeatures(IList<FeatureInfo> features)
Parameters
Type Name Description
System.Collections.Generic.IList<FeatureInfo> features

The features.

| Improve this Doc View Source

SortEnabledFeatureManagerFactories(ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>>)

Sorts the feature manager factories.

Declaration
protected virtual ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>> SortEnabledFeatureManagerFactories(ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>> featureManagerFactories)
Parameters
Type Name Description
System.Collections.Generic.ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>> featureManagerFactories

The feature manager factories.

Returns
Type Description
System.Collections.Generic.ICollection<IExportFactory<IFeatureManager, FeatureManagerMetadata>>

The sorted feature manager factories.

Implements

ILoggable
IAppManager

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