Click or drag to resize

ComponentRegistration Class

Describes a logical component within the container.
Inheritance Hierarchy

Namespace:  Autofac.Core.Registration
Assembly:  Autofac (in Autofac.dll) Version: 4.9.1+831973f4d02fbc619921dfaa8ac0c536f60ae7a3
public class ComponentRegistration : Disposable, 
	IComponentRegistration, IDisposable

The ComponentRegistration type exposes the following members.

Public propertyActivator
Gets or sets 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.
Protected propertyIsDisposed
Gets a value indicating whether the current instance has been disposed.
(Inherited from Disposable.)
Public propertyLifetime
Gets the lifetime associated with the component.
Public propertyMetadata
Gets additional data associated with the component.
Public propertyOwnership
Gets information about whether the instances of the component should be disposed by the container.
Public propertyServices
Gets the services provided by the component.
Public propertySharing
Gets information about whether the component instances are shared or not.
Public propertyTarget
Gets the component registration upon which this registration is based. If this registration was created directly by the user, returns this.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Disposable.)
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources.
(Overrides DisposableDispose(Boolean).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
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.
Public methodToString
Describes the component in a human-readable form.
(Overrides ObjectToString.)
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.
Extension Methods
Public Extension MethodMatchingLifetimeScopeTags
For components registered instance-per-matching-lifetime-scope, retrieves the set of lifetime scope tags to match.
(Defined by ComponentRegistrationExtensions.)
See Also