Click or drag to resize

ComponentRegistry Class

Maps services onto the components that provide them.
Inheritance Hierarchy
SystemObject
  Autofac.UtilDisposable
    Autofac.Core.RegistrationComponentRegistry

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

The ComponentRegistry type exposes the following members.

Constructors
  NameDescription
Public methodComponentRegistry
Initializes a new instance of the ComponentRegistry class.
Top
Properties
  NameDescription
Public propertyHasLocalComponents
Gets a value indicating whether the registry contains its own components. True if the registry contains its own components; false if it is forwarding registrations from another external registry.
Protected propertyIsDisposed
Gets a value indicating whether the current instance has been disposed.
(Inherited from Disposable.)
Public propertyProperties
Gets the set of properties used during component registration.
Public propertyRegistrations
Gets the registered components.
Public propertySources
Gets the registration sources that are used by the registry.
Top
Methods
  NameDescription
Protected methodAddRegistration
Public methodAddRegistrationSource
Add a registration source that will provide registrations on-the-fly.
Public methodDecoratorsFor
Selects all available decorator registrations that can be applied to the specified registration.
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.)
Public methodIsRegistered
Determines whether the specified service is registered.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRegister(IComponentRegistration)
Register a component.
Public methodRegister(IComponentRegistration, Boolean)
Register a component.
Public methodRegistrationsFor
Selects from the available registrations after ensuring that any dynamic registration sources that may provide service have been invoked.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetRegistration
Attempts to find a default registration for the specified service.
Top
Events
  NameDescription
Public eventRegistered
Fired whenever a component is registered - either explicitly or via a IRegistrationSource.
Public eventRegistrationSourceAdded
Fired when an IRegistrationSource is added to the registry.
Top
Remarks
The component registry provides services directly from components, and also uses IRegistrationSource to generate components on-the-fly or as adapters for other components. A component registry is normally used through a ContainerBuilder, and not directly by application code.
See Also