ApplicationServiceContext
instance. ApplicationServiceContext
depends on the environment that SanteDB is running within, they can be:HTTP 503 Service Unavailable
result. IConfigurationProvider
service instance and instructs it to load its configuration files. It also loads the dependency injection manager and any configured plugins in the configuration file (including validation of the services listed in the ApplicationServiceContextConfigurationSection
section).IDaemonService
implementations and calls the Start()
method on those services. The daemon services are started in the order they appear in the configuration file. ApplicationServiceContext
will fire the Started
event. Many plugins use this event to perform any last-minute binding or startup procedures. This is done because, by stage 3, the application host context has initialized its plugins and is, for all intents and purposes, running.Start
event:IDaemonServices
of its shutdown using the Stop()
method on the daemon. The daemons should perform any shutdown/stop procedures to remove themselves from the application domain context.IDisposable
will have their Dispose()
method called. This allows any passie services to clean up unmanaged handles, and perform disposal of ports/bindings/etc.IDisposable
is considered background information. Consult Microsoft's Documentation for more information on when/how to use and implement IDisposable
.