Class FeatureLifecycleBehaviorBase
Base class for feature lifecycle behaviors.
Inherited Members
Namespace: Kephas.Application
Assembly: Kephas.Application.dll
Syntax
public abstract class FeatureLifecycleBehaviorBase : Loggable, ILoggable, IFeatureLifecycleBehavior
Methods
| Improve this Doc View SourceAfterFinalizeAsync(IAppContext, FeatureManagerMetadata, CancellationToken)
Interceptor called after a feature completes its asynchronous finalization.
Declaration
public virtual Task AfterFinalizeAsync(IAppContext appContext, FeatureManagerMetadata serviceMetadata, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IAppContext | appContext | Context for the application. |
FeatureManagerMetadata | serviceMetadata | The feature manager service metadata. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task. |
AfterInitializeAsync(IAppContext, FeatureManagerMetadata, CancellationToken)
Interceptor called after a feature completes its asynchronous initialization.
Declaration
public virtual Task AfterInitializeAsync(IAppContext appContext, FeatureManagerMetadata serviceMetadata, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IAppContext | appContext | Context for the application. |
FeatureManagerMetadata | serviceMetadata | The feature manager service metadata. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The asynchronous result. |
BeforeFinalizeAsync(IAppContext, FeatureManagerMetadata, CancellationToken)
Interceptor called before a feature starts its asynchronous finalization.
Declaration
public virtual Task BeforeFinalizeAsync(IAppContext appContext, FeatureManagerMetadata serviceMetadata, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IAppContext | appContext | Context for the application. |
FeatureManagerMetadata | serviceMetadata | The feature manager service metadata. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task. |
Remarks
To interrupt finalization, simply throw any appropriate exception. Caution! Interrupting the finalization may cause the application to remain in an undefined state.
BeforeInitializeAsync(IAppContext, FeatureManagerMetadata, CancellationToken)
Interceptor called before a feature starts its asynchronous initialization.
Declaration
public virtual Task BeforeInitializeAsync(IAppContext appContext, FeatureManagerMetadata serviceMetadata, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IAppContext | appContext | Context for the application. |
FeatureManagerMetadata | serviceMetadata | The feature manager service metadata. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The asynchronous result. |
Remarks
To interrupt the feature initialization, simply throw an appropriate exception.