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: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
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