• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.Addons
    • IAction
    • IApplicationBootstrapper
    • IAsyncShutdownAction
    • IAsyncStartupAction
    • IBootstrapper
    • IDependencyProvider
    • IMefServiceLocator
    • IModule
    • IServiceExporter
    • IServiceRepository
    • IShutdownAction
    • IShutdownMetadata
    • IShutdownModule
    • IStartupAction
    • IStartupMetadata
    • IStartupModule
    • ModuleAttribute
    • ShutdownActionAttribute
    • StartupActionAttribute
    • StartupException
  • Dapplo.Addons.Bootstrapper
    • ApplicationBootstrapper
    • CompositionBootstrapper
    • ResourceMutex
    • StartupShutdownBootstrapper
  • Dapplo.Addons.Bootstrapper.Internal
    • CompressionTypes
    • StreamExtensions
  • Dapplo.Addons.Bootstrapper.Resolving
    • AssemblyResolver
    • EmbeddedResources
    • FileLocations
    • FileTools

Class StartupShutdownBootstrapper

A bootstrapper, which has functionality for the startup and shutdown actions

Inheritance
System.Object
CompositionBootstrapper
StartupShutdownBootstrapper
ApplicationBootstrapper
Inherited Members
CompositionBootstrapper.AggregateCatalog
CompositionBootstrapper.CompositionOptionFlags
CompositionBootstrapper.Container
CompositionBootstrapper.ExportProviders
CompositionBootstrapper.IsAggregateCatalogConfigured
CompositionBootstrapper.GetService(Type)
CompositionBootstrapper.Configure()
CompositionBootstrapper.Unconfigure()
CompositionBootstrapper.KnownAssemblies
CompositionBootstrapper.KnownFiles
CompositionBootstrapper.AddScanDirectory(String)
CompositionBootstrapper.AddScanDirectories(IEnumerable<String>)
CompositionBootstrapper.Add(Assembly)
CompositionBootstrapper.Add(AssemblyCatalog)
CompositionBootstrapper.FindAndLoadAssembly(String, IEnumerable<String>)
CompositionBootstrapper.FindAndLoadAssemblies(String, Boolean, IEnumerable<String>)
CompositionBootstrapper.FindAndLoadAssembliesFromDirectory(String, String, Boolean, IEnumerable<String>)
CompositionBootstrapper.FindAndLoadAssembliesFromDirectory(String, Regex, Boolean)
CompositionBootstrapper.FindAndLoadAssemblies(IEnumerable<String>, Regex, Boolean)
CompositionBootstrapper.Add(Type)
CompositionBootstrapper.Add(ExportProvider)
CompositionBootstrapper.ProvideDependencies(Object)
CompositionBootstrapper.GetExport<T>(String)
CompositionBootstrapper.GetExport<T, TMetaData>(String)
CompositionBootstrapper.GetExport(Type, String)
CompositionBootstrapper.GetExports<T>(String)
CompositionBootstrapper.GetExports(Type, String)
CompositionBootstrapper.GetExports<T, TMetaData>(String)
CompositionBootstrapper.GetInstance(Type)
CompositionBootstrapper.GetInstance(Type, String)
CompositionBootstrapper.GetAllInstances(Type)
CompositionBootstrapper.GetInstance<TService>()
CompositionBootstrapper.GetInstance<TService>(String)
CompositionBootstrapper.GetAllInstances<TService>()
CompositionBootstrapper.Export<T>(T, IDictionary<String, Object>)
CompositionBootstrapper.Export(Type, Object, IDictionary<String, Object>)
CompositionBootstrapper.Export<T>(String, T, IDictionary<String, Object>)
CompositionBootstrapper.Export(Type, String, Object, IDictionary<String, Object>)
CompositionBootstrapper.Release(ComposablePart)
CompositionBootstrapper.IsInitialized
CompositionBootstrapper.InitializeAsync(CancellationToken)
CompositionBootstrapper.Dispose(Boolean)
CompositionBootstrapper.Dispose()
CompositionBootstrapper.RegisterForDisposal(IDisposable)
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 Source

AutoShutdown

Specifies if Dispose automatically calls the shutdown

Declaration
public bool AutoShutdown { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

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 Source

RunAsync(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
CompositionBootstrapper.RunAsync(CancellationToken)
| Improve this Doc View Source

ShutdownAsync(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

Overrides
CompositionBootstrapper.StopAsync(CancellationToken)
  • Improve this Doc
  • View Source
Back to top Copyright © 2017 Dapplo