Class StartupShutdownBootstrapper
A bootstrapper, which has functionality for the startup and shutdown actions
Inherited Members
Namespace:Dapplo.Addons.Bootstrapper
Assembly:Dapplo.Addons.Bootstrapper.dll
Syntax
public class StartupShutdownBootstrapper : CompositionBootstrapper, IBootstrapper, IServiceLocator, IMefServiceLocator, IServiceExporter, IServiceRepository, IDependencyProvider, IDisposable
Properties
| Improve this Doc View SourceAutoShutdown
Specifies if Dispose automatically calls the shutdown
Declaration
public bool AutoShutdown { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AutoStartup
Specifies if Run automatically calls the startup
Declaration
public bool AutoStartup { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceRunAsync(CancellationToken)
Override the run to make sure "this" is injected
Declaration
public override Task<bool> RunAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<System.Boolean> |
Overrides
| Improve this Doc View SourceShutdownAsync(CancellationToken)
Initiate Shutdown on all "Shutdown actions"
Declaration
public Task ShutdownAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task | Task |
StartupAsync(CancellationToken)
Startup all "Startup actions" Call this after run, it will find all IStartupAction's and start them in the specified order
Declaration
public Task StartupAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task | Task |
StopAsync(CancellationToken)
Stop the Bootstrapper
Declaration
public override Task<bool> StopAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
Task<System.Boolean> | Task |