Click or drag to resize

ComponentRegistration Constructor (Guid, IInstanceActivator, IComponentLifetime, InstanceSharing, InstanceOwnership, IEnumerableService, IDictionaryString, Object, RegistrationOptions)

Initializes a new instance of the ComponentRegistration class.

Namespace:  Autofac.Core.Registration
Assembly:  Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax
public ComponentRegistration(
	Guid id,
	IInstanceActivator activator,
	IComponentLifetime lifetime,
	InstanceSharing sharing,
	InstanceOwnership ownership,
	IEnumerable<Service> services,
	IDictionary<string, Object> metadata,
	RegistrationOptions options = RegistrationOptions.None
)

Parameters

id
Type: SystemGuid
Unique identifier for the component.
activator
Type: Autofac.CoreIInstanceActivator
Activator used to activate instances.
lifetime
Type: Autofac.CoreIComponentLifetime
Determines how the component will be associated with its lifetime.
sharing
Type: Autofac.CoreInstanceSharing
Whether the component is shared within its lifetime scope.
ownership
Type: Autofac.CoreInstanceOwnership
Whether the component instances are disposed at the end of their lifetimes.
services
Type: System.Collections.GenericIEnumerableService
Services the component provides.
metadata
Type: System.Collections.GenericIDictionaryString, Object
Data associated with the component.
options (Optional)
Type: Autofac.Core.RegistrationRegistrationOptions
Contains options for the registration.
See Also