Click or drag to resize

IRegistrationBuilderTLimit, TActivatorData, TRegistrationStyle Interface

Data structure used to construct registrations.

Namespace:  Autofac.Builder
Assembly:  Autofac (in Autofac.dll) Version: 4.9.1+831973f4d02fbc619921dfaa8ac0c536f60ae7a3
Syntax
public interface IRegistrationBuilder<out TLimit, out TActivatorData, out TRegistrationStyle>

Type Parameters

TLimit
The most specific type to which instances of the registration can be cast.
TActivatorData
Activator builder type.
TRegistrationStyle
Registration style type.

The IRegistrationBuilderTLimit, TActivatorData, TRegistrationStyle type exposes the following members.

Methods
  NameDescription
Public methodAs(Type)
Configure the services that the component will provide.
Public methodAs(Service)
Configure the services that the component will provide.
Public methodAsTService
Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances.
Public methodAsTService1, TService2
Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances.
Public methodAsTService1, TService2, TService3
Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances.
Public methodExternallyOwned
Configure the component so that instances are never disposed by the container.
Public methodInstancePerDependency
Configure the component so that every dependent component or call to Resolve() gets a new, unique instance (default).
Public methodInstancePerLifetimeScope
Configure the component so that every dependent component or call to Resolve() within a single ILifetimeScope gets the same, shared instance. Dependent components in different lifetime scopes will get different instances.
Public methodInstancePerMatchingLifetimeScope
Configure the component so that every dependent component or call to Resolve() within a ILifetimeScope tagged with any of the provided tags value gets the same, shared instance. Dependent components in lifetime scopes that are children of the tagged scope will share the parent's instance. If no appropriately tagged scope can be found in the hierarchy an DependencyResolutionException is thrown.
Public methodInstancePerOwned(Type)
Configure the component so that every dependent component or call to Resolve() within a ILifetimeScope created by an owned instance gets the same, shared instance. Dependent components in lifetime scopes that are children of the owned instance scope will share the parent's instance. If no appropriate owned instance scope can be found in the hierarchy an DependencyResolutionException is thrown.
Public methodInstancePerOwned(Object, Type)
Configure the component so that every dependent component or call to Resolve() within a ILifetimeScope created by an owned instance gets the same, shared instance. Dependent components in lifetime scopes that are children of the owned instance scope will share the parent's instance. If no appropriate owned instance scope can be found in the hierarchy an DependencyResolutionException is thrown.
Public methodInstancePerOwnedTService
Configure the component so that every dependent component or call to Resolve() within a ILifetimeScope created by an owned instance gets the same, shared instance. Dependent components in lifetime scopes that are children of the owned instance scope will share the parent's instance. If no appropriate owned instance scope can be found in the hierarchy an DependencyResolutionException is thrown.
Public methodInstancePerOwnedTService(Object)
Configure the component so that every dependent component or call to Resolve() within a ILifetimeScope created by an owned instance gets the same, shared instance. Dependent components in lifetime scopes that are children of the owned instance scope will share the parent's instance. If no appropriate owned instance scope can be found in the hierarchy an DependencyResolutionException is thrown.
Public methodKeyed(Object, Type)
Provide a key that can be used to retrieve the component.
Public methodKeyedTService(Object)
Provide a key that can be used to retrieve the component.
Public methodNamed(String, Type)
Provide a textual name that can be used to retrieve the component.
Public methodNamedTService(String)
Provide a textual name that can be used to retrieve the component.
Public methodOnActivated
Add a handler for the Activated event.
Public methodOnActivating
Add a handler for the Activating event.
Public methodOnPreparing
Add a handler for the Preparing event. This event allows manipulating of the parameters that will be provided to the component.
Public methodOwnedByLifetimeScope
Configure the component so that instances that support IDisposable are disposed by the container (default).
Public methodPropertiesAutowired
Configure the component so that any properties whose types are registered in the container and follow specific criteria will be wired to instances of the appropriate service.
Public methodSingleInstance
Configure the component so that every dependent component or call to Resolve() gets the same, shared instance.
Public methodWithMetadata(IEnumerableKeyValuePairString, Object)
Associates data with the component.
Public methodWithMetadata(String, Object)
Associates data with the component.
Public methodWithMetadataTMetadata(ActionMetadataConfigurationTMetadata)
Associates data with the component.
Top
See Also