Click or drag to resize

IComponentRegistration Interface

Describes a logical component within the container.

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

The IComponentRegistration type exposes the following members.

Properties
  NameDescription
Public propertyActivator
Gets the activator used to create instances.
Public propertyId
Gets a unique identifier for this component (shared in all sub-contexts.) This value also appears in Services.
Public propertyLifetime
Gets the lifetime associated with the component.
Public propertyMetadata
Gets additional data associated with the component.
Public propertyOwnership
Gets a value indicating whether the instances of the component should be disposed by the container.
Public propertyServices
Gets the services provided by the component.
Public propertySharing
Gets a value indicating whether the component instances are shared or not.
Public propertyTarget
Gets the component registration upon which this registration is based.
Top
Methods
  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
Public methodRaiseActivated
Called by the container once an instance has been fully constructed, including any requested objects that depend on the instance.
Public methodRaiseActivating
Called by the container once an instance has been constructed.
Public methodRaisePreparing
Called by the container when an instance is required.
Top
Events
  NameDescription
Public eventActivated
Fired when the activation process for a new instance is complete.
Public eventActivating
Fired when a new instance is being activated. The instance can be wrapped or switched at this time by setting the Instance property in the provided event arguments.
Public eventPreparing
Fired when a new instance is required. The instance can be provided in order to skip the regular activator, by setting the Instance property in the provided event arguments.
Top
Extension Methods
  NameDescription
Public Extension MethodMatchingLifetimeScopeTags
For components registered instance-per-matching-lifetime-scope, retrieves the set of lifetime scope tags to match.
(Defined by ComponentRegistrationExtensions.)
Top
See Also