Interface IAppManager
Singleton service contract for the application manager.
Namespace: Kephas.Application
Assembly: Kephas.Application.dll
Syntax
[SingletonAppServiceContract]
public interface IAppManager
Remarks
The application manager is a service whose concern is to initialize and finalize the application.
Examples
var appManager = compositionContext.GetExport<IAppManager>();
var appContext = new AppContext();
await appManager.InitializeAppManagerAsync(appContext);
...
await appManager.FinalizeAppAsync(appContext);
Methods
| Improve this Doc View SourceFinalizeAppAsync(IAppContext, CancellationToken)
Finalizes the application asynchronously.
Declaration
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. |
InitializeAppAsync(IAppContext, CancellationToken)
Initializes the application asynchronously.
Declaration
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. |