Click or drag to resize

IStartable Interface

When implemented by a component, an instance of the component will be resolved and started as soon as the container is built. Autofac will not call the Start() method when subsequent instances are resolved. If this behavior is required, use an OnActivated() event handler instead.

Namespace:  Autofac
Assembly:  Autofac (in Autofac.dll) Version: 4.9.1+831973f4d02fbc619921dfaa8ac0c536f60ae7a3
Syntax
public interface IStartable

The IStartable type exposes the following members.

Methods
  NameDescription
Public methodStart
Perform once-off startup processing.
Top
Remarks
For equivalent "Stop" functionality, implement IDisposable. Autofac will always dispose a component before any of its dependencies (except in the presence of circular dependencies, in which case the components in the cycle are disposed in reverse-construction order.)
See Also