Autofac Reflection activator data for concrete types. Initializes a new instance of the class. Type that will be activated. Gets the instance activator based on the provided data. Parameterises the construction of a container by a . No options - the default behavior for container building. Prevents inclusion of standard modules like support for relationship types including etc. Does not call on components implementing this interface (useful for module testing.) Reference object allowing location and update of a registration callback. Initializes a new instance of the class. An that executes a registration action against an . Thrown if is . Gets or sets the callback to execute during registration. An that executes a registration action against an . Thrown if is . Gets the callback identifier. A that uniquely identifies the callback action in a set of callbacks. Registration style for dynamic registrations. Activator data that can provide an IInstanceActivator instance. Gets the instance activator based on the provided data. Hides standard Object members to make fluent interfaces easier to read. Based on blog post by @kzu here: http://www.clariusconsulting.net/blogs/kzu/archive/2008/03/10/58301.aspx. Standard System.Object member. Standard result. Standard System.Object member. Standard result. Standard System.Object member. Standard result. Standard System.Object member. The other. Standard result. Data structure used to construct registrations. The most specific type to which instances of the registration can be cast. Activator builder type. Registration style type. Gets the activator data. Gets the registration style. Gets the registration data. Configure the component so that instances are never disposed by the container. A registration builder allowing further configuration of the component. Configure the component so that instances that support IDisposable are disposed by the container (default). A registration builder allowing further configuration of the component. Configure the component so that every dependent component or call to Resolve() gets a new, unique instance (default). A registration builder allowing further configuration of the component. Configure the component so that every dependent component or call to Resolve() gets the same, shared instance. A registration builder allowing further configuration of the component. 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. A registration builder allowing further configuration of the component. 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 is thrown. Tag applied to matching lifetime scopes. A registration builder allowing further configuration of the component. 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 is thrown. Service type. A registration builder allowing further configuration of the component. 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 is thrown. Service type. A registration builder allowing further configuration of the component. 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 is thrown. The service type provided by the component. Key to associate with the component. A registration builder allowing further configuration of the component. 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 is thrown. Key to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances. Service type. A registration builder allowing further configuration of the component. Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances. Service type. Service type. A registration builder allowing further configuration of the component. Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances. Service type. Service type. Service type. A registration builder allowing further configuration of the component. Configure the services that the component will provide. Service types to expose. A registration builder allowing further configuration of the component. Configure the services that the component will provide. Services to expose. A registration builder allowing further configuration of the component. Provide a textual name that can be used to retrieve the component. Named service to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Provide a textual name that can be used to retrieve the component. Named service to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Provide a key that can be used to retrieve the component. Key to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Provide a key that can be used to retrieve the component. Key to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Add a handler for the Preparing event. This event allows manipulating of the parameters that will be provided to the component. The event handler. A registration builder allowing further configuration of the component. Add a handler for the Activating event. The event handler. A registration builder allowing further configuration of the component. Add a handler for the Activated event. The event handler. A registration builder allowing further configuration of the component. 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. Selector to determine which properties should be injected. Determine if circular dependencies should be allowed or not. A registration builder allowing further configuration of the component. Associates data with the component. Key by which the data can be located. The data value. A registration builder allowing further configuration of the component. Associates data with the component. The extended properties to associate with the component. A registration builder allowing further configuration of the component. Associates data with the component. A type with properties whose names correspond to the property names to configure. The action used to configure the metadata. A registration builder allowing further configuration of the component. Used with the WithMetadata configuration method to associate key-value pairs with an . Interface with properties whose names correspond to the property keys. This feature was suggested by OJ Reeves (@TheColonial). Set one of the property values. The type of the property. An expression that accesses the property to set. The property value to set. Builder for reflection-based activators. Initializes a new instance of the class. Type that will be activated. Gets or sets the implementation type. Gets or sets the constructor finder for the registration. Gets or sets the constructor selector for the registration. Gets the explicitly bound constructor parameters. Gets the explicitly bound properties. Static factory methods to simplify the creation and handling of IRegistrationBuilder{L,A,R}. To create an for a specific type, use: var cr = RegistrationBuilder.ForType(t).CreateRegistration(); The full builder syntax is supported. var cr = RegistrationBuilder.ForType(t).Named("foo").ExternallyOwned().CreateRegistration(); Creates a registration builder for the provided delegate. Instance type returned by delegate. Delegate to register. A registration builder. Creates a registration builder for the provided delegate. Delegate to register. Most specific type return value of delegate can be cast to. A registration builder. Creates a registration builder for the provided type. Implementation type to register. A registration builder. Creates a registration builder for the provided type. Implementation type to register. A registration builder. Create an from a . There is no need to call this method when registering components through a . When called on the result of one of the methods, the returned registration will be different from the one the builder itself registers in the container. var registration = RegistrationBuilder.ForType<Foo>().CreateRegistration(); The registration builder. An IComponentRegistration. Thrown if is . Create an IComponentRegistration from data. Id of the registration. Registration data. Activator. Services provided by the registration. An IComponentRegistration. Create an IComponentRegistration from data. Id of the registration. Registration data. Activator. Services provided by the registration. Optional; target registration. An IComponentRegistration. Thrown if or is . Register a component in the component registry. This helper method is necessary in order to execute OnRegistered hooks and respect PreserveDefaults. Hoping to refactor this out. Component registry to make registration in. Registration builder with data for new registration. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The type '{0}' is not assignable to service '{1}'.. Gets the activator data. Gets the registration style. Gets the registration data. Configure the component so that instances are never disposed by the container. A registration builder allowing further configuration of the component. Configure the component so that instances that support IDisposable are disposed by the container (default). A registration builder allowing further configuration of the component. Configure the component so that every dependent component or call to Resolve() gets a new, unique instance (default). A registration builder allowing further configuration of the component. Configure the component so that every dependent component or call to Resolve() gets the same, shared instance. A registration builder allowing further configuration of the component. 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. A registration builder allowing further configuration of the component. 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 is thrown. Tag applied to matching lifetime scopes. A registration builder allowing further configuration of the component. 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 is thrown. The service type provided by the component. A registration builder allowing further configuration of the component. 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 is thrown. The service type provided by the component. A registration builder allowing further configuration of the component. 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 is thrown. The service type provided by the component. Key to associate with the component. A registration builder allowing further configuration of the component. 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 is thrown. Key to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances. Service type. A registration builder allowing further configuration of the component. Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances. Service type. Service type. A registration builder allowing further configuration of the component. Configure the services that the component will provide. The generic parameter(s) to As() will be exposed as TypedService instances. Service type. Service type. Service type. A registration builder allowing further configuration of the component. Configure the services that the component will provide. Service types to expose. A registration builder allowing further configuration of the component. Configure a single service that the component will provide. Service type to expose. A registration builder allowing further configuration of the component. Configure the services that the component will provide. Services to expose. A registration builder allowing further configuration of the component. Configure a single service that the component will provide. Service to expose. A registration builder allowing further configuration of the component. Provide a textual name that can be used to retrieve the component. Named service to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Provide a textual name that can be used to retrieve the component. Named service to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Provide a key that can be used to retrieve the component. Key to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Provide a key that can be used to retrieve the component. Key to associate with the component. The service type provided by the component. A registration builder allowing further configuration of the component. Add a handler for the Preparing event. This event allows manipulating of the parameters that will be provided to the component. The event handler. A registration builder allowing further configuration of the component. Add a handler for the Activating event. The event handler. A registration builder allowing further configuration of the component. Add a handler for the Activated event. The event handler. A registration builder allowing further configuration of the component. 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. Selector to determine which properties should be injected. Determine if circular dependencies should be allowed or not. A registration builder allowing further configuration of the component. Associates data with the component. Key by which the data can be located. The data value. A registration builder allowing further configuration of the component. Associates data with the component. The extended properties to associate with the component. A registration builder allowing further configuration of the component. Associates data with the component. A type with properties whose names correspond to the property names to configure. The action used to configure the metadata. A registration builder allowing further configuration of the component. Data common to all registrations made in the container, both direct (IComponentRegistration) and dynamic (IRegistrationSource). Initializes a new instance of the class. The default service that will be used if no others are added. Gets the services explicitly assigned to the component. Add multiple services for the registration, overriding the default. The services to add. If an empty collection is specified, this will still clear the default service. Add a service to the registration, overriding the default. The service to add. Gets or sets the instance ownership assigned to the component. Gets or sets the lifetime assigned to the component. Gets or sets the sharing mode assigned to the component. Gets the extended properties assigned to the component. Gets or sets the callback used to register this component. A that contains the delegate used to register this component with an . Gets the handlers for the Preparing event. Gets the handlers for the Activating event. Gets the handlers for the Activated event. Copies the contents of another RegistrationData object into this one. The data to copy. When true, the default service will be changed to that of the other. Thrown if is . Empties the configured services. Adds registration syntax for less commonly-used features. These features are in this namespace because they will remain accessible to applications originally written against Autofac 1.4. In Autofac 2, this functionality is implicitly provided and thus making explicit registrations is rarely necessary. Registers a factory delegate. Container builder. Factory type to generate. Registration builder allowing the registration to be configured. Factory delegates are provided automatically in Autofac 2, and this method is generally not required. Registers a factory delegate. Container builder. Factory type to generate. The service that the delegate will return instances of. Registration builder allowing the registration to be configured. Factory delegates are provided automatically in Autofac 2, and this method is generally not required. Registers a factory delegate. The type of the delegate. Container builder. The service that the delegate will return instances of. Registration builder allowing the registration to be configured. Factory delegates are provided automatically in Autofac 2, and this method is generally not required. Registers a factory delegate. The type of the delegate. Container builder. Registration builder allowing the registration to be configured. Factory delegates are provided automatically in Autofac 2, and this method is generally not required. Changes the parameter mapping mode of the supplied delegate type to match parameters by name. Factory delegate type. Activator data type. Registration style. Registration to change parameter mapping mode of. Registration builder allowing the registration to be configured. Thrown if is . Changes the parameter mapping mode of the supplied delegate type to match parameters by position. Factory delegate type. Activator data type. Registration style. Registration to change parameter mapping mode of. Registration builder allowing the registration to be configured. Thrown if is . Changes the parameter mapping mode of the supplied delegate type to match parameters by type. Factory delegate type. Activator data type. Registration style. Registration to change parameter mapping mode of. Registration builder allowing the registration to be configured. Thrown if is . An activator builder with no parameters. Initializes a new instance of the class. The activator to return. Gets the activator. Registration style for individual components. Gets or sets the ID used for the registration. Gets the handlers to notify of the component registration event. Gets or sets a value indicating whether default registrations should be preserved. By default, new registrations override existing registrations as defaults. If set to true, new registrations will not change existing defaults. Gets or sets the component upon which this registration is based. Executes the startable and auto-activate components in a context. The in which startables should execute. Used to build an from component registrations. var builder = new ContainerBuilder(); builder.RegisterType<Logger>() .As<ILogger>() .SingleInstance(); builder.Register(c => new MessageHandler(c.Resolve<ILogger>())); var container = builder.Build(); // resolve components from container... Most functionality is accessed via extension methods in . Initializes a new instance of the class. Initializes a new instance of the class. The properties used during component registration. Gets the set of properties used during component registration. An that can be used to share context across registrations. Register a callback that will be invoked when the container is configured. This is primarily for extending the builder syntax. Callback to execute. Register a callback that will be invoked when the container is built. Callback to execute. The instance to continue registration calls. Create a new container with the component registrations that have been made. Options that influence the way the container is initialised. Build can only be called once per - this prevents ownership issues for provided instances. Build enables support for the relationship types that come with Autofac (e.g. Func, Owned, Meta, Lazy, IEnumerable.) To exclude support for these types, first create the container, then call Update() on the builder. A new container with the configured component registrations. Configure an existing container with the component registrations that have been made. Update can only be called once per - this prevents ownership issues for provided instances. An existing container to make the registrations in. Configure an existing container with the component registrations that have been made and allows additional build options to be specified. Update can only be called once per - this prevents ownership issues for provided instances. An existing container to make the registrations in. Options that influence the way the container is updated. Configure an existing registry with the component registrations that have been made. Update can only be called once per - this prevents ownership issues for provided instances. An existing registry to make the registrations in. Configure an existing registry with the component registrations that have been made. Primarily useful in dynamically adding registrations to a child lifetime scope. Update can only be called once per - this prevents ownership issues for provided instances. An existing registry to make the registrations in. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Build() or Update() can only be called once on a ContainerBuilder.. Looks up a localized string similar to An error occurred while attempting to automatically activate registration '{0}'. See the inner exception for information on the source of the failure.. Fired when the activation process for a new instance is complete. Initializes a new instance of the class. The context. The component. The parameters. The instance. Gets the context in which the activation occurred. Gets the component providing the instance. Gets the paramters provided when resolved. Gets the instance that will be used to satisfy the request. Fired after the construction of an instance but before that instance is shared with any other or any members are invoked on it. Initializes a new instance of the class. The context. The component. The parameters. The instance. Gets the context in which the activation occurred. Gets the component providing the instance. Gets or sets the instance that will be used to satisfy the request. The instance can be replaced if needed, e.g. by an interface proxy. The instance can be replaced if needed, e.g. by an interface proxy. The object to use instead of the activated instance. Gets the parameters supplied to the activator. Provides default property selector that applies appropriate filters to ensure only public settable properties are selected (including filtering for value types and indexed properties). Initializes a new instance of the class that provides default selection criteria. Determines if values should be preserved or not. Gets or sets a value indicating whether the value should be set if the value is already set (ie non-null). Gets an instance of DefaultPropertySelector that will cause values to be overwritten. Gets an instance of DefaultPropertySelector that will preserve any values already set. Provides default filtering to determine if property should be injected by rejecting non-public settable properties. Property to be injected. Instance that has the property to be injected. Whether property should be injected. Provides a property selector that applies a filter defined by a delegate. Initializes a new instance of the class that invokes a delegate to determine selection. Delegate to determine whether a property should be injected. Activate instances using a delegate. Initializes a new instance of the class. The most specific type to which activated instances can be cast. Activation delegate. Activate an instance in the provided context. Context in which to activate instances. Parameters to the instance. The activated instance. The context parameter here should probably be ILifetimeScope in order to reveal Disposer, but will wait until implementing a concrete use case to make the decision. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to A delegate registered to create instances of '{0}' returned null.. Base class for instance activators. Initializes a new instance of the class. Most derived type to which instances can be cast. Gets the most specific type that the component instances are known to be castable to. Gets a string representation of the activator. A string describing the activator. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Instances cannot be created by this activator as it has already been disposed.. Provides a pre-constructed instance. Initializes a new instance of the class. The instance to provide. Activate an instance in the provided context. Context in which to activate instances. Parameters to the instance. The activated instance. The context parameter here should probably be ILifetimeScope in order to reveal Disposer, but will wait until implementing a concrete use case to make the decision. Gets or sets a value indicating whether the activator disposes the instance that it holds. Necessary because otherwise instances that are never resolved will never be disposed. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The provided instance of '{0}' has already been used in an activation request. Did you combine a provided instance with non-root/single-instance lifetime/sharing?. Supplies values based on the target parameter type. Returns true if the parameter is able to provide a value to a particular site. Constructor, method, or property-mutator parameter. The component context in which the value is being provided. If the result is true, the valueProvider parameter will be set to a function that will lazily retrieve the parameter value. If the result is false, will be set to null. True if a value can be supplied; otherwise, false. Thrown if or is . Binds a constructor to the parameters that will be used when it is invoked. Gets the constructor on the target type. The actual constructor used might differ, e.g. if using a dynamic proxy. Gets a value indicating whether the binding is valid. Initializes a new instance of the class. ConstructorInfo to bind. Available parameters. Context in which to construct instance. Invoke the constructor with the parameter bindings. The constructed instance. Gets a description of the constructor parameter binding. Returns a System.String that represents the current System.Object. A System.String that represents the current System.Object. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Bound constructor '{0}'.. Looks up a localized string similar to The binding cannot be instantiated: {0}. Looks up a localized string similar to An exception was thrown while invoking the constructor '{0}' on type '{1}'.. Looks up a localized string similar to Cannot resolve parameter '{1}' of constructor '{0}'.. Finds constructors that match a finder function. Initializes a new instance of the class. Default to selecting all public constructors. Initializes a new instance of the class. The finder function. Finds suitable constructors on the target type. Type to search for constructors. Suitable constructors. Provides parameters that have a default value, set with an optional parameter declaration in C# or VB. Returns true if the parameter is able to provide a value to a particular site. Constructor, method, or property-mutator parameter. The component context in which the value is being provided. If the result is true, the parameter will be set to a function that will lazily retrieve the parameter value. If the result is , will be set to . if a value can be supplied; otherwise, . Thrown if is . Find suitable constructors from which to select. Finds suitable constructors on the target type. Type to search for constructors. Suitable constructors. Selects the best constructor from a set of available constructors. Selects the best constructor from the available constructors. Available constructors. Parameters to the instance being resolved. The best constructor. Selects a constructor based on its signature. Initializes a new instance of the class. Signature to match. Selects the best constructor from the available constructors. Available constructors. Parameters to the instance being resolved. The best constructor. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to At least one binding must be provided in order to select a constructor.. Looks up a localized string similar to The required constructor on type '{0}' with signature '{1}' is unavailable.. Looks up a localized string similar to More than one constructor matches the signature '{0}'.. Selects the constructor with the most parameters. Selects the best constructor from the available constructors. Available constructors. Parameters to the instance being resolved. The best constructor. A single unambiguous match could not be chosen. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Cannot choose between multiple constructors with equal length {0} on type '{1}'. Select the constructor explicitly, with the UsingConstructor() configuration method, when the component is registered.. Initializes a new instance of the class. The whose constructor was not found. Initializes a new instance of the class. The whose constructor was not found. Exception message. Initializes a new instance of the class. The whose constructor was not found. The inner exception. Initializes a new instance of the class. The whose constructor was not found. Exception message. The inner exception. Gets the type without found constructors. A that was processed by an or similar mechanism and was determined to have no available constructors. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to No accessible constructors were found for the type '{0}'.. Uses reflection to activate instances of a type. Initializes a new instance of the class. Type to activate. Constructor finder. Constructor selector. Parameters configured explicitly for this instance. Properties configured explicitly for this instance. Gets the constructor finder. Gets the constructor selector. Activate an instance in the provided context. Context in which to activate instances. Parameters to the instance. The activated instance. The context parameter here should probably be ILifetimeScope in order to reveal Disposer, but will wait until implementing a concrete use case to make the decision. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to No constructors on type '{0}' can be found with the constructor finder '{1}'.. Looks up a localized string similar to None of the constructors found with '{0}' on type '{1}' can be invoked with the available services and parameters:{2}. Finds suitable properties to inject. Provides filtering to determine if property should be injected. Property to be injected. Instance that has the property to be injected. Whether property should be injected. Service used as a "flag" to indicate a particular component should be automatically activated on container build. Gets the service description. Always returns AutoActivate. Determines whether the specified is equal to the current . The to compare with the current . if the specified is not and is an ; otherwise, . All services of this type are considered "equal". Serves as a hash function for a particular type. A hash code for the current . Always 0 for this type. All services of this type are considered "equal" and use the same hash code. Information about the ocurrence of a component being registered with a container. Gets the container into which the registration was made. Gets the component registration. Initializes a new instance of the class. The container into which the registration was made. The component registration. Extension methods for . For components registered instance-per-matching-lifetime-scope, retrieves the set of lifetime scope tags to match. The to query for matching lifetime scope tags. If the component is registered instance-per-matching-lifetime-scope, this method returns the set of matching lifetime scope tags. If the component is singleton, instance-per-scope, instance-per-dependency, or otherwise not an instance-per-matching-lifetime-scope component, this method returns an empty enumeration. Base class for parameters that provide a constant value. Gets the value of the parameter. Initializes a new instance of the class. The constant parameter value. A predicate used to locate the parameter that should be populated by the constant. Returns true if the parameter is able to provide a value to a particular site. Constructor, method, or property-mutator parameter. The component context in which the value is being provided. If the result is true, the valueProvider parameter will be set to a function that will lazily retrieve the parameter value. If the result is false, will be set to null. True if a value can be supplied; otherwise, false. Standard container implementation. Initializes a new instance of the class. The properties used during component registration. Begin a new sub-scope. Instances created via the sub-scope will be disposed along with it. A new lifetime scope. Begin a new sub-scope. Instances created via the sub-scope will be disposed along with it. The tag applied to the . A new lifetime scope. Begin a new nested scope, with additional components available to it. Component instances created via the new scope will be disposed along with it. Action on a that adds component registrations visible only in the new scope. A new lifetime scope. Begin a new nested scope, with additional components available to it. Component instances created via the new scope will be disposed along with it. The tag applied to the . Action on a that adds component registrations visible only in the new scope. A new lifetime scope. Gets the disposer associated with this container. Instances can be associated with it manually if required. Gets the tag applied to the lifetime scope. The tag applied to this scope and the contexts generated when it resolves component dependencies. Fired when a new scope based on the current scope is beginning. Fired when this scope is ending. Fired when a resolve operation is beginning in this scope. Gets associated services with the components that provide them. Resolve an instance of the provided registration within the context. The registration. Parameters for the instance. The component instance. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the service object of the specified type. An object that specifies the type of service object to get. A service object of type .-or- null if there is no service object of type . A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The container's self-registration of context interfaces should never be activated as it is hard-wired into the LifetimeScope class.. Base exception type thrown whenever the dependency resolution process fails. This is a fatal exception, as Autofac is unable to 'roll back' changes to components that may have already been made during the operation. For example, 'on activated' handlers may have already been fired, or 'single instance' components partially constructed. Initializes a new instance of the class. The message. Initializes a new instance of the class. The message. The inner exception. Marks a module as container-aware (for the purposes of attaching to diagnostic events.) Initialise the module with the container into which it is being registered. The container. Maintains a set of objects to dispose, and disposes them in the reverse order from which they were added when the Disposer is itself disposed. Contents all implement IDisposable. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Adds an object to the disposer. When the disposer is disposed, so will the object be. The instance. Fired when the activation process for a new instance is complete. Gets the context in which the activation occurred. Gets the component providing the instance. Gets the paramters provided when resolved. Gets the instance that will be used to satisfy the request. Fired after the construction of an instance but before that instance is shared with any other or any members are invoked on it. Gets the context in which the activation occurred. Gets the component providing the instance. Gets the instance that will be used to satisfy the request. The instance can be replaced if needed, e.g. by an interface proxy. The object to use instead of the activated instance. Gets the parameters supplied to the activator. Locates the lifetime to which instances of a component should be attached. Given the most nested scope visible within the resolve operation, find the scope for the component. The most nested visible scope. The scope for the component. Describes a logical component within the container. Gets a unique identifier for this component (shared in all sub-contexts.) This value also appears in Services. Gets the activator used to create instances. Gets the lifetime associated with the component. Gets a value indicating whether the component instances are shared or not. Gets a value indicating whether the instances of the component should be disposed by the container. Gets the services provided by the component. Gets additional data associated with the component. Gets the component registration upon which this registration is based. Fired when a new instance is required, prior to activation. Can be used to provide Autofac with additional parameters, used during activation. Called by the container when an instance is required. The context in which the instance will be activated. Parameters for activation. These may be modified by the event handler. 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. Called by the container once an instance has been constructed. The context in which the instance was activated. The parameters supplied to the activator. The instance. Fired when the activation process for a new instance is complete. Called by the container once an instance has been fully constructed, including any requested objects that depend on the instance. The context in which the instance was activated. The parameters supplied to the activator. The instance. Provides component registrations according to the services they provide. Gets the set of properties used during component registration. An that can be used to share context across registrations. Attempts to find a default registration for the specified service. The service to look up. The default registration for the service. True if a registration exists. Determines whether the specified service is registered. The service to test. True if the service is registered. Register a component. The component registration. Register a component. The component registration. If true, existing defaults for the services provided by the component will not be changed. Gets the set of registered components. Selects from the available registrations after ensuring that any dynamic registration sources that may provide have been invoked. The service for which registrations are sought. Registrations supporting . Selects all available decorator registrations that can be applied to the specified registration. The registration for which decorator registrations are sought. Decorator registrations applicable to . Fired whenever a component is registered - either explicitly or via a . Add a registration source that will provide registrations on-the-fly. The source to register. Gets the registration sources that are used by the registry. 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. This property is used when walking up the scope tree looking for registrations for a new customised scope. Fired when an is added to the registry. Provided on an object that will dispose of other objects when it is itself disposed. Adds an object to the disposer. When the disposer is disposed, so will the object be. The instance. Activates component instances. Activate an instance in the provided context. Context in which to activate instances. Parameters to the instance. The activated instance. The context parameter here should probably be ILifetimeScope in order to reveal Disposer, but will wait until implementing a concrete use case to make the decision. Gets the most specific type that the component instances are known to be castable to. Represents a set of components and related functionality packaged together. Apply the module to the component registry. Component registry to apply configuration to. Determines when instances supporting IDisposable are disposed. The lifetime scope does not dispose the instances. The instances are disposed when the lifetime scope is disposed. Determines whether instances are shared within a lifetime scope. Each request for an instance will return a new object. Each request for an instance will return the same object. Allows registrations to be made on-the-fly when unregistered services are requested (lazy registrations.) Retrieve registrations for an unregistered service, to be used by the container. The service that was requested. A function that will return existing registrations for a service. Registrations providing the service. If the source is queried for service s, and it returns a component that implements both s and s', then it will not be queried again for either s or s'. This means that if the source can return other implementations of s', it should return these, plus the transitive closure of other components implementing their additional services, along with the implementation of s. It is not an error to return components that do not implement . Gets a value indicating whether the registrations provided by this source are 1:1 adapters on top of other components (e.g., Meta, Func, or Owned). Interface supported by services that carry type information. Gets the type of the service. The type of the service. Return a new service of the same kind, but carrying as the . The new service type. A new service with the service type. Defines a nested structure of lifetimes. Gets the root of the sharing hierarchy. Gets the parent of this node of the hierarchy, or null. Try to retrieve an instance based on a GUID key. If the instance does not exist, invoke to create it. Key to look up. Creation function. An instance. Identifies a service using a key in addition to its type. Initializes a new instance of the class. Key of the service. Type of the service. Gets the key of the service. The key of the service. Gets the type of the service. The type of the service. Gets a human-readable description of the service. The description. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. true if the current object is equal to the parameter; otherwise, false. Determines whether the specified is equal to the current . The to compare with the current . true if the specified is equal to the current ; otherwise, false. The parameter is null. Serves as a hash function for a particular type. A hash code for the current . Return a new service of the same kind, but carrying as the . The new service type. A new service with the service type. Attaches the instance's lifetime to the current lifetime scope. Given the most nested scope visible within the resolve operation, find the scope for the component. The most nested visible scope. The scope for the component. Lifetime scope implementation. Protects shared instances from concurrent access. Other members and the base class are threadsafe. The tag applied to root scopes when no other tag is specified. Initializes a new instance of the class. The tag applied to the . Components used in the scope. Parent scope. Initializes a new instance of the class. The tag applied to the . Components used in the scope. Initializes a new instance of the class. Components used in the scope. Begin a new anonymous sub-scope. Instances created via the sub-scope will be disposed along with it. A new lifetime scope. Begin a new tagged sub-scope. Instances created via the sub-scope will be disposed along with it. The tag applied to the . A new lifetime scope. Begin a new anonymous sub-scope, with additional components available to it. Component instances created via the new scope will be disposed along with it. Action on a that adds component registrations visible only in the new scope. A new lifetime scope. IContainer cr = // ... using (var lifetime = cr.BeginLifetimeScope(builder => { builder.RegisterType<Foo>(); builder.RegisterType<Bar>().As<IBar>(); }) { var foo = lifetime.Resolve<Foo>(); } Begin a new tagged sub-scope, with additional components available to it. Component instances created via the new scope will be disposed along with it. The tag applied to the . Action on a that adds component registrations visible only in the new scope. A new lifetime scope. IContainer cr = // ... using (var lifetime = cr.BeginLifetimeScope("unitOfWork", builder => { builder.RegisterType<Foo>(); builder.RegisterType<Bar>().As<IBar>(); }) { var foo = lifetime.Resolve<Foo>(); } Creates and setup the registry for a child scope. The tag applied to the . Action on a that adds component registrations visible only in the child scope. Registry to use for a child scope. It is the responsibility of the caller to make sure that the registry is properly disposed of. This is generally done by adding the registry to the property of the child scope. Resolve an instance of the provided registration within the context. The registration. Parameters for the instance. The component instance. Gets the parent of this node of the hierarchy, or null. Gets the root of the sharing hierarchy. Try to retrieve an instance based on a GUID key. If the instance does not exist, invoke to create it. Key to look up. Creation function. An instance. Gets the disposer associated with this container. Instances can be associated with it manually if required. Gets the tag applied to the lifetime scope. The tag applied to this scope and the contexts generated when it resolves component dependencies. Gets the services associated with the components that provide them. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the service object of the specified type. An object that specifies the type of service object to get. A service object of type .-or- null if there is no service object of type . Fired when a new scope based on the current scope is beginning. Fired when this scope is ending. Fired when a resolve operation is beginning in this scope. Describes when a lifetime scope is beginning. Initializes a new instance of the class. The lifetime scope that is beginning. Gets the lifetime scope that is beginning. Describes when a lifetime scope is ending. Initializes a new instance of the class. The lifetime scope that is ending. Gets the lifetime scope that is ending. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The tag '{0}' has already been assigned to a parent lifetime scope. If you are using Owned<T> this indicates you may have a circular dependency chain.. Looks up a localized string similar to Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.. Looks up a localized string similar to The constructor of type '{0}' attempted to create another instance of itself. This is not permitted because the service is configured to only allowed a single instance per lifetime scope.. Attaches the component's lifetime to scopes matching a supplied expression. Initializes a new instance of the class. The tags applied to matching scopes. Gets the list of lifetime scope tags to match. An of object tags to match when searching for the lifetime scope for the component. Given the most nested scope visible within the resolve operation, find the scope for the component. The most nested visible scope. The scope for the component. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to No scope with a tag matching '{0}' is visible from the scope in which the instance was requested. If you see this during execution of a web application, it generally indicates that a component registered as per-HTTP request is being requested by a SingleInstance() component (or a similar scenario). Under the web integration always request dependencies from the dependency resolver or the request lifetime scope, never from the container itself.. Well-known tags used in setting up matching lifetime scopes. Tag used in setting up per-request lifetime scope registrations (e.g., per-HTTP-request or per-API-request). Attaches the component's lifetime to the root scope. Given the most nested scope visible within the resolve operation, find the scope for the component. The most nested visible scope. The scope for the component. A property identified by name. When applied to a reflection-based component, the name will be matched against property names. Gets the name of the property. Initializes a new instance of the class. The name of the property. The property value. Used in order to provide a value to a constructor parameter or property on an instance being created by the container. Not all parameters can be applied to all sites. Returns true if the parameter is able to provide a value to a particular site. Constructor, method, or property-mutator parameter. The component context in which the value is being provided. If the result is true, the valueProvider parameter will be set to a function that will lazily retrieve the parameter value. If the result is false, will be set to null. True if a value can be supplied; otherwise, false. Fired before the activation process to allow parameters to be changed or an alternative instance to be provided. Initializes a new instance of the class. The context. The component. The parameters. Gets the context in which the activation is occurring. Gets the component providing the instance being activated. Gets or sets the parameters supplied to the activator. Fired when an is added to the registry. Initializes a new instance of the class. The registry to which the source was added. The source that was added. Gets the registry to which the source was added. Gets the source that was added. A service was requested that cannot be provided by the container. To avoid this exception, either register a component to provide the required service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency. This exception is fatal. See for more information. Initializes a new instance of the class. The service. Initializes a new instance of the class. The service. The inner exception. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The requested service '{0}' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.. Describes a logical component within the container. Initializes a new instance of the class. Unique identifier for the component. Activator used to activate instances. Determines how the component will be associated with its lifetime. Whether the component is shared within its lifetime scope. Whether the component instances are disposed at the end of their lifetimes. Services the component provides. Data associated with the component. Initializes a new instance of the class. Unique identifier for the component. Activator used to activate instances. Determines how the component will be associated with its lifetime. Whether the component is shared within its lifetime scope. Whether the component instances are disposed at the end of their lifetimes. Services the component provides. Data associated with the component. The component registration upon which this registration is based. Gets the component registration upon which this registration is based. If this registration was created directly by the user, returns this. Gets a unique identifier for this component (shared in all sub-contexts.) This value also appears in Services. Gets or sets the activator used to create instances. Gets the lifetime associated with the component. Gets information about whether the component instances are shared or not. Gets information about whether the instances of the component should be disposed by the container. Gets the services provided by the component. Gets additional data associated with the component. Fired when a new instance is required, prior to activation. Can be used to provide Autofac with additional parameters, used during activation. Called by the container when an instance is required. The context in which the instance will be activated. Parameters for activation. 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. Called by the container once an instance has been constructed. The context in which the instance was activated. The parameters supplied to the activator. The instance. Fired when the activation process for a new instance is complete. Called by the container once an instance has been fully constructed, including any requested objects that depend on the instance. The context in which the instance was activated. The parameters supplied to the activator. The instance. Describes the component in a human-readable form. A description of the component. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Wraps a component registration, switching its lifetime. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Activator = {0}, Services = [{1}], Lifetime = {2}, Sharing = {3}, Ownership = {4}. Maps services onto the components that provide them. The component registry provides services directly from components, and also uses to generate components on-the-fly or as adapters for other components. A component registry is normally used through a , and not directly by application code. Protects instance variables from concurrent access. External registration sources. All registrations. Keeps track of the status of registered services. Initializes a new instance of the class. Initializes a new instance of the class. The properties used during component registration. Gets the set of properties used during component registration. An that can be used to share context across registrations. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Attempts to find a default registration for the specified service. The service to look up. The default registration for the service. True if a registration exists. Determines whether the specified service is registered. The service to test. True if the service is registered. Register a component. The component registration. Register a component. The component registration. If true, existing defaults for the services provided by the component will not be changed. Gets the registered components. Selects from the available registrations after ensuring that any dynamic registration sources that may provide have been invoked. The service for which registrations are sought. Registrations supporting . Fired whenever a component is registered - either explicitly or via a . Add a registration source that will provide registrations on-the-fly. The source to register. Gets the registration sources that are used by the registry. 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. This property is used when walking up the scope tree looking for registrations for a new customised scope. Fired when an is added to the registry. Delegates registration lookups to a specified registry. When write operations are applied, initialises a new 'writeable' registry. Safe for concurrent access by multiple readers. Write operations are single-threaded. Gets or sets the set of properties used during component registration. An that can be used to share context across registrations. Pulls registrations from another component registry. Excludes most auto-generated registrations - currently has issues with collection registrations. Initializes a new instance of the class. Component registry to pull registrations from. Retrieve registrations for an unregistered service, to be used by the container. The service that was requested. A function that will return existing registrations for a service. Registrations providing the service. Gets a value indicating whether components are adapted from the same logical scope. In this case because the components that are adapted do not come from the same logical scope, we must return false to avoid duplicating them. ComponentRegistration subtyped only to distinguish it from other adapted registrations. Interface providing fluent syntax for chaining module registrations. Add a module to the container. The module to add. The to allow additional chained module registrations. Interface providing fluent syntax for chaining registration source registrations. Add a registration source to the container. The registration source to add. The to allow additional chained registration source registrations. Basic implementation of the interface allowing registration of modules into a in a fluent format. The into which registrations will be made. Initializes a new instance of the class. The into which registrations will be made. Thrown if is . Add a module to the container. The module to add. The to allow additional chained module registrations. Thrown if is . Switches components with a RootScopeLifetime (singletons) with decorators exposing MatchingScopeLifetime targeting the specified scope. Tracks the services known to the registry. List of implicit default service implementations. Overriding default implementations are appended to the end, so the enumeration should begin from the end too, and the most default implementation comes last. List of service implementations coming from sources. Sources have priority over preserve-default implementations. Implementations from sources are enumerated in preserve-default order, so the most default implementation comes first. List of explicit service implementations specified with the PreserveExistingDefaults option. Enumerated in preserve-defaults order, so the most default implementation comes first. Used for bookkeeping so that the same source is not queried twice (may be null). Initializes a new instance of the class. The tracked service. Gets a value indicating whether the first time a service is requested, initialization (e.g. reading from sources) happens. This value will then be set to true. Calling many methods on this type before initialization is an error. Gets the known implementations. The first implementation is a default one. Gets a value indicating whether any implementations are known. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The operation is only valid during initialization.. Looks up a localized string similar to The operation is not valid until the object is initialized.. Basic implementation of the interface allowing registration of registration sources into a in a fluent format. The into which registrations will be made. Initializes a new instance of the class. The into which registrations will be made. Thrown if is . Add a registration source to the container. The registration source to add. The to allow additional chained registration source registrations. Thrown if is . Flexible parameter type allows arbitrary values to be retrieved from the resolution context. Initializes a new instance of the class. A predicate that determines which parameters on a constructor will be supplied by this instance. A function that supplies the parameter value given the context. Returns true if the parameter is able to provide a value to a particular site. Constructor, method, or property-mutator parameter. The component context in which the value is being provided. If the result is true, the valueProvider parameter will be set to a function that will lazily retrieve the parameter value. If the result is false, will be set to null. True if a value can be supplied; otherwise, false. Construct a that will match parameters of type and resolve for those parameters an implementation registered with the name . The type of the parameter to match. The name of the matching service to resolve. A configured instance. Construct a that will match parameters of type and resolve for those parameters an implementation registered with the key . The type of the parameter to match. The key of the matching service to resolve. A configured instance. Catch circular dependencies that are triggered by post-resolve processing (e.g. 'OnActivated'). A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Circular component dependency detected: {0}.. Looks up a localized string similar to Probable circular dependency between factory-scoped components. Chain includes '{0}'. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The activation has already been executed: {0}. Looks up a localized string similar to An exception was thrown while activating {0}.. Looks up a localized string similar to Unable to resolve the type '{0}' because the lifetime scope it belongs in can't be located. The following services are exposed by this registration: {1} Details. Represents the process of finding a component during a resolve operation. Gets the component for which an instance is to be looked up. Gets the scope in which the instance will be looked up. Gets the parameters provided for new instance creation. Raised when the lookup phase of the operation is ending. Raised when the completion phase of an instance lookup operation begins. Raised when the completion phase of an instance lookup operation ends. Fired when instance lookup is complete. Initializes a new instance of the class. The instance lookup that is ending. Gets the instance lookup operation that is beginning. Raised when the completion phase of an instance lookup operation begins. Initializes a new instance of the class. The instance lookup that is beginning the completion phase. Gets the instance lookup operation that is beginning the completion phase. Raised when the completion phase of an instance lookup operation ends. Initializes a new instance of the class. The instance lookup that is ending the completion phase. Gets the instance lookup operation that is ending the completion phase. Fired when an instance is looked up. Initializes a new instance of the class. The instance lookup that is ending. True if a new instance was created as part of the operation. Gets a value indicating whether a new instance was created as part of the operation. Gets the instance lookup operation that is ending. An is a component context that sequences and monitors the multiple activations that go into producing a single requested object graph. Get or create and share an instance of in the . The scope in the hierarchy in which the operation will begin. The component to resolve. Parameters for the component. The component instance. Raised when the entire operation is complete. Raised when an instance is looked up within the operation. A is a component context that sequences and monitors the multiple activations that go into producing a single requested object graph. Initializes a new instance of the class. The most nested scope in which to begin the operation. The operation can move upward to less nested scopes as components with wider sharing scopes are activated. Resolve an instance of the provided registration within the context. The registration. Parameters for the instance. The component instance. Execute the complete resolve operation. The registration. Parameters for the instance. Continue building the object graph by instantiating in the current . The current scope of the operation. The component to activate. The parameters for the component. The resolved instance. Gets the services associated with the components that provide them. Describes the commencement of a new resolve operation. Initializes a new instance of the class. The resolve operation that is beginning. Gets the resolve operation that is beginning. Describes the commencement of a new resolve operation. Initializes a new instance of the class. The resolve operation that is ending. If included, the exception causing the operation to end; otherwise, null. Gets the exception causing the operation to end, or null. Gets the resolve operation that is ending. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to An exception was thrown while executing a resolve operation. See the InnerException for details.. Looks up a localized string similar to Probable circular dependency between factory-scoped components. Chain includes '{0}'. Looks up a localized string similar to This resolve operation has already ended. When registering components using lambdas, the IComponentContext 'c' parameter to the lambda cannot be stored. Instead, either resolve IComponentContext again from 'c', or resolve a Func<> based factory to create subsequent components from.. Services are the lookup keys used to locate component instances. Gets a human-readable description of the service. The description. Returns a that represents the current . A that represents the current . Implements the operator ==. The left operand. The right operand. The result of the operator. Implements the operator !=. The left operand. The right operand. The result of the operator. Determines whether the specified is equal to the current . The to compare with the current . true if the specified is equal to the current ; otherwise, false. The parameter is null. Serves as a hash function for a particular type. A hash code for the current . A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Subclasses of Autofac.Service must override Object.Equals(). Looks up a localized string similar to Subclasses of Autofac.Service must override Object.GetHashCode(). Identifies a service according to a type to which it can be assigned. Initializes a new instance of the class. Type of the service. Gets the type of the service. The type of the service. Gets a human-readable description of the service. The description. Indicates whether the current object is equal to another object of the same type. An object to compare with this object. true if the current object is equal to the parameter; otherwise, false. Determines whether the specified is equal to the current . The to compare with the current . true if the specified is equal to the current ; otherwise, false. The parameter is null. Serves as a hash function for a particular type. A hash code for the current . Return a new service of the same kind, but carrying as the . The new service type. A new service with the service type. A handy unique service identifier type - all instances will be regarded as unequal. Initializes a new instance of the class. Initializes a new instance of the class. The id. Gets a programmer-readable description of the identifying feature of the service. Determines whether the specified is equal to the current . The to compare with the current . true if the specified is equal to the current ; otherwise, false. The parameter is null. Serves as a hash function for a particular type. A hash code for the current . Provides an annotation to resolve constructor dependencies according to their registered key. This attribute allows constructor dependencies to be resolved by key. By marking your dependencies with this attribute and associating an attribute filter with your type registration, you can be selective about which service registration should be used to provide the dependency. A simple example might be registration of a specific logger type to be used by a class. If many loggers are registered with their own key, the consumer can simply specify the key filter as an attribute to the constructor parameter. public class Manager { public Manager([KeyFilter("Manager")] ILogger logger) { // ... } } The same thing can be done for enumerable: public class SolutionExplorer { public SolutionExplorer( [KeyFilter("Solution")] IEnumerable<IAdapter> adapters, [KeyFilter("Solution")] ILogger logger) { this.Adapters = adapters.ToList(); this.Logger = logger; } } When registering your components, the associated key on the dependencies will be used. Be sure to specify the extension on the type with the filtered constructor parameters. var builder = new ContainerBuilder(); // Register the components getting filtered with keys builder.RegisterType<ConsoleLogger>().Keyed<ILogger>("Solution"); builder.RegisterType<FileLogger>().Keyed<ILogger>("Other"); // Attach the filtering behavior to the component with the constructor builder.RegisterType<SolutionExplorer>().WithAttributeFiltering(); var container = builder.Build(); // The resolved instance will have the appropriate services in place var explorer = container.Resolve<SolutionExplorer>(); Initializes a new instance of the class. The key that the dependency should have in order to satisfy the parameter. Gets the key the dependency is expected to have to satisfy the parameter. The corresponding to a registered service key on a component. Resolved components must be keyed with this value to satisfy the filter. Resolves a constructor parameter based on keyed service requirements. The specific parameter being resolved that is marked with this attribute. The component context under which the parameter is being resolved. The instance of the object that should be used for the parameter value. Thrown if or is . Provides an annotation to filter constructor dependencies according to their specified metadata. This attribute allows constructor dependencies to be filtered by metadata. By marking your dependencies with this attribute and associating an attribute filter with your type registration, you can be selective about which service registration should be used to provide the dependency. A simple example might be registration of a specific logger type to be used by a class. If many loggers are registered with the LoggerName metadata, the consumer can simply specify the filter as an attribute to the constructor parameter. public class Manager { public Manager([MetadataFilter("LoggerName", "Manager")] ILogger logger) { // ... } } The same thing can be done for enumerable: public class SolutionExplorer { public SolutionExplorer( [MetadataFilter("Target", "Solution")] IEnumerable<IAdapter> adapters, [MetadataFilter("LoggerName", "Solution")] ILogger logger) { this.Adapters = adapters.ToList(); this.Logger = logger; } } When registering your components, the associated metadata on the dependencies will be used. Be sure to specify the extension on the type with the filtered constructor parameters. var builder = new ContainerBuilder(); // Attach metadata to the components getting filtered builder.RegisterType<ConsoleLogger>().WithMetadata("LoggerName", "Solution").As<ILogger>(); builder.RegisterType<FileLogger>().WithMetadata("LoggerName", "Other").As<ILogger>(); // Attach the filtering behavior to the component with the constructor builder.RegisterType<SolutionExplorer>().WithAttributeFiltering(); var container = builder.Build(); // The resolved instance will have the appropriate services in place var explorer = container.Resolve<SolutionExplorer>(); Initializes a new instance of the class. The metadata key that the dependency should have in order to satisfy the parameter. The metadata value that the dependency should have in order to satisfy the parameter. Gets the key the dependency is expected to have to satisfy the parameter. The corresponding to a registered metadata key on a component. Resolved components must have this metadata key to satisfy the filter. Gets the value the dependency is expected to have to satisfy the parameter. The corresponding to a registered metadata value on a component. Resolved components must have the metadata with this value to satisfy the filter. Resolves a constructor parameter based on metadata requirements. The specific parameter being resolved that is marked with this attribute. The component context under which the parameter is being resolved. The instance of the object that should be used for the parameter value. Thrown if or is . Base attribute class for marking constructor parameters and enabling filtering by attributed criteria. Implementations of this attribute can be used to mark constructor parameters so filtering can be done based on registered service data. For example, the allows constructor parameters to be filtered by registered metadata criteria and the allows constructor parameters to be filtered by a keyed service registration. If a type uses these attributes, it should be registered with Autofac using the extension to enable the behavior. For specific attribute usage examples, see the attribute documentation. Implemented in derived classes to resolve a specific parameter marked with this attribute. The specific parameter being resolved that is marked with this attribute. The component context under which the parameter is being resolved. The instance of the object that should be used for the parameter value. Extends registration syntax for attribute scenarios. Applies attribute-based filtering on constructor dependencies for use with attributes derived from the . The type of the registration limit. Activator data type. Registration style type. The registration builder containing registration data. Registration builder allowing the registration to be configured. Thrown if is . Apply this extension to component registrations that use attributes that derive from the like the in their constructors. Doing so will allow the attribute-based filtering to occur. See for an example on how to use the filter and attribute together. Registration source providing implicit collection/list/enumerable support. This registration source provides enumerable support to allow resolving the set of all registered services of a given type. What may not be immediately apparent is that it also means any time there are no items of a particular type registered, it will always return an empty set rather than or throwing an exception. This is by design. Consider the [possibly majority] use case where you're resolving a set of message handlers or event handlers from the container. If there aren't any handlers, you want an empty set - not or an exception. It's valid to have no handlers registered. This implicit support means other areas (like MVC support or manual property injection) must take care to only request enumerable values they expect to get something back for. In other words, "Don't ask the container for something you don't expect to resolve". Retrieve registrations for an unregistered service, to be used by the container. The service that was requested. A function that will return existing registrations for a service. Registrations providing the service. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Collection Support (Arrays and Generic Collection Interfaces). A service that has been registered for the purpose of decorating other components. This service type is used to locate decorator services and is intended for internal use only. Gets the condition that must be met for the decorator to be applied. Initializes a new instance of the class. The service type for the decorator. The condition that must be met for the decorator to be applied. Gets the implementation type of the service that is being decorated. Gets the service type of the service that is being decorated. Gets the implementation types of the decorators that have been applied. Gets the decorator instances that have been applied. Gets the current instance in the decorator chain. This will be initialized to the service being decorated and will then become the decorated instance as each decorator is applied. Generates context-bound closures that represent factories from a set of heuristics based on delegate type signatures. Initializes a new instance of the class. The service that will be activated in order to create the products of the factory. The delegate to provide as a factory. The parameter mapping mode to use. Initializes a new instance of the class. The component that will be activated in order to create the products of the factory. The delegate to provide as a factory. The parameter mapping mode to use. Generates a factory delegate that closes over the provided context. The context in which the factory will be used. Parameters provided to the resolve call for the factory itself. A factory delegate that will work within the context. Generates a factory delegate that closes over the provided context. The context in which the factory will be used. Parameters provided to the resolve call for the factory itself. A factory delegate that will work within the context. Data used to create factory activators. Initializes a new instance of the class. The type of the factory. The service used to provide the products of the factory. Gets or sets a value determining how the parameters of the delegate type are passed on to the generated Resolve() call as Parameter objects. For Func-based delegates, this defaults to ByType. Otherwise, the parameters will be mapped by name. Gets the activator data that can provide an IInstanceActivator instance. Retrieve registrations for an unregistered service, to be used by the container. The service that was requested. A function that will return existing registrations for a service. Registrations providing the service. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Unable to generate a function to return type '{0}' with input parameter types [{1}]. The input parameter type list has duplicate types. Try registering a custom delegate type instead of using a generic Func relationship.. Looks up a localized string similar to Delegate Support (Func<T>and Custom Delegates). Determines how the parameters of the delegate type are passed on to the generated Resolve() call as Parameter objects. Chooses parameter mapping based on the factory type. For Func-based factories this is equivalent to ByType, for all others ByName will be used. Pass the parameters supplied to the delegate through to the underlying registration as NamedParameters based on the parameter names in the delegate type's formal argument list. Pass the parameters supplied to the delegate through to the underlying registration as TypedParameters based on the parameter types in the delegate type's formal argument list. Pass the parameters supplied to the delegate through to the underlying registration as PositionalParameters based on the parameter indices in the delegate type's formal argument list. Provides components by lookup operations via an index (key) type. The type of the index. The service provided by the indexed components. Retrieving a value given a key: IIndex<AccountType, IRenderer> accountRenderers = // ... var renderer = accountRenderers[AccountType.User]; Get the value associated with . The value to retrieve. The associated value. Get the value associated with if any is available. The key to look up. The retrieved value. True if a value associated with the key exists. Support the type automatically whenever type T is registered with the container. When a dependency of a lazy type is used, the instantiation of the underlying component will be delayed until the Value property is first accessed. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Lazy<T> Support. Support the System.Lazy<T, TMetadata> types automatically whenever type T is registered with the container. Metadata values come from the component registration's metadata. When a dependency of a lazy type is used, the instantiation of the underlying component will be delayed until the Value property is first accessed. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Lazy<T, TMetadata> Support. Describes the basic requirements for generating a lightweight adapter. Initializes a new instance of the class. The service that will be adapted from. The adapter function. Gets the adapter function. Gets the service to be adapted from. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Lightweight Adapter from {0} to {1}. Looks up a localized string similar to The service {0} cannot be both the adapter's from and to parameters - these must differ.. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The type '{0}' cannot be used as a metadata view. A metadata view must be a concrete class with a parameterless or dictionary constructor.. Looks up a localized string similar to Export metadata for '{0}' is missing and no default value was supplied.. Support the types automatically whenever type T is registered with the container. Metadata values come from the component registration's metadata. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Meta<T> Support. Looks up a localized string similar to Meta<T, TMetadata> Support. Provides a value along with metadata describing the value. The type of the value. An interface to which metadata values can be bound. Initializes a new instance of the class. The value described by the instance. The metadata describing the value. Gets the value described by . Gets metadata describing the value. Provides a value along with a dictionary of metadata describing the value. The type of the value. Initializes a new instance of the class. The value described by the instance. The metadata describing the value. Gets the value described by . Gets the metadata describing the value. Support the types automatically whenever type T is registered with the container. Metadata values come from the component registration's metadata. Describes the activator for an open generic decorator. Initializes a new instance of the class. The decorator type. The open generic service type to decorate. Gets the open generic service type to decorate. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The service '{0}' is not an open generic type.. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The service {0} cannot be both the adapter's from and to parameters - these must differ.. Looks up a localized string similar to Open Generic Decorator {0} from {1} to {2}. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The type {0} is not an open generic type definition.. Generates activators for open generic types. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to {0} providing {1}. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The type '{0}' does not implement the interface '{1}'.. Looks up a localized string similar to The implementation type '{0}' is not an open generic type definition.. Looks up a localized string similar to The implementation type '{0}' does not support the interface '{1}'.. Looks up a localized string similar to The service '{0}' is not an open generic type definition.. Looks up a localized string similar to The service '{1}' is not assignable from implementation type '{0}'.. Represents a dependency that can be released by the dependent component. The service provided by the dependency. Autofac automatically provides instances of whenever the service is registered. It is not necessary for , or the underlying component, to implement . Disposing of the object is the correct way to handle cleanup of the dependency, as this will dispose of any other components created indirectly as well. When is resolved, a new is created for the underlying , and tagged with the service matching , generally a . This means that shared instances can be tied to this scope by registering them as InstancePerMatchingLifetimeScope(new TypedService(typeof(T))). The component D below is disposable and implements IService: public class D : IService, IDisposable { // ... } The dependent component C can dispose of the D instance whenever required by taking a dependency on : public class C { IService _service; public C(Owned<IService> service) { _service = service; } void DoWork() { _service.Value.DoSomething(); } void OnFinished() { _service.Dispose(); } } In general, rather than depending on directly, components will depend on System.Func<Owned<T>> in order to create and dispose of other components as required. Initializes a new instance of the class. The value representing the instance. An IDisposable interface through which ownership can be released. Gets or sets the owned value. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Generates registrations for services of type whenever the service T is available. Retrieve registrations for an unregistered service, to be used by the container. The service that was requested. A function that will return existing registrations for a service. Registrations providing the service. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Owned<T> Support. Provides registrations on-the-fly for any concrete type not already registered with the container. Initializes a new instance of the class. Initializes a new instance of the class. A predicate that selects types the source will register. Retrieve registrations for an unregistered service, to be used by the container. The service that was requested. A function that will return existing registrations for a service. Registrations providing the service. Gets a value indicating whether the registrations provided by this source are 1:1 adapters on top of other components (e.g., Meta, Func, or Owned). Gets or sets an expression used to configure generated registrations. A that can be used to modify the behavior of registrations that are generated by this source. Returns a that represents the current . A that represents the current . Extension methods for configuring the . Fluent method for setting the registration configuration on . The registration source to configure. A configuration action that will run on any registration provided by the source. The with the registration configuration set. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to "Resolve Anything" Support. Activation data for types located by scanning assemblies. Initializes a new instance of the class. Gets the filters applied to the types from the scanned assembly. Gets the additional actions to be performed on the concrete type registrations. Gets the actions to be called once the scanning operation is complete. Enables contravariant Resolve() for interfaces that have a single contravariant ('in') parameter. interface IHandler<in TCommand> { void Handle(TCommand command); } class Command { } class DerivedCommand : Command { } class CommandHandler : IHandler<Command> { ... } var builder = new ContainerBuilder(); builder.RegisterSource(new ContravariantRegistrationSource()); builder.RegisterType<CommandHandler>(); var container = builder.Build(); // Source enables this line, even though IHandler<Command> is the // actual registered type. var handler = container.Resolve<IHandler<DerivedCommand>>(); handler.Handle(new DerivedCommand()); Retrieve registrations for an unregistered service, to be used by the container. The service that was requested. A function that will return existing registrations for a service. Registrations providing the service. If the source is queried for service s, and it returns a component that implements both s and s', then it will not be queried again for either s or s'. This means that if the source can return other implementations of s', it should return these, plus the transitive closure of other components implementing their additional services, along with the implementation of s. It is not an error to return components that do not implement . Gets a value indicating whether the registrations provided by this source are 1:1 adapters on top of other components (e.g., Meta, Func, or Owned). The context in which a service can be accessed or a component's dependencies resolved. Disposal of a context will dispose any owned components. Gets the associated services with the components that provide them. Resolve an instance of the provided registration within the context. The registration. Parameters for the instance. The component instance. Creates, wires dependencies and manages lifetime for a set of components. Most instances of are created by a . // See ContainerBuilder for the definition of the builder variable using (var container = builder.Build()) { var program = container.Resolve<Program>(); program.Run(); } Most functionality is provided by extension methods on the inherited interface. An tracks the instantiation of component instances. It defines a boundary in which instances are shared and configured. Disposing an will dispose the components that were resolved through it. // See IContainer for definition of the container variable using (var requestScope = container.BeginLifetimeScope()) { // Note that handler is resolved from requestScope, not // from the container: var handler = requestScope.Resolve<IRequestHandler>(); handler.Handle(request); // When requestScope is disposed, all resources used in processing // the request will be released. } All long-running applications should resolve components via an . Choosing the duration of the lifetime is application- specific. The standard Autofac WCF and ASP.NET/MVC integrations are already configured to create and release s as appropriate. For example, the ASP.NET integration will create and release an per HTTP request. Most functionality is provided by extension methods on the inherited interface. Begin a new nested scope. Component instances created via the new scope will be disposed along with it. A new lifetime scope. Begin a new nested scope. Component instances created via the new scope will be disposed along with it. The tag applied to the . A new lifetime scope. Begin a new nested scope, with additional components available to it. Component instances created via the new scope will be disposed along with it. The components registered in the sub-scope will be treated as though they were registered in the root scope, i.e., SingleInstance() components will live as long as the root scope. Action on a that adds component registrations visible only in the new scope. A new lifetime scope. Begin a new nested scope, with additional components available to it. Component instances created via the new scope will be disposed along with it. The components registered in the sub-scope will be treated as though they were registered in the root scope, i.e., SingleInstance() components will live as long as the root scope. The tag applied to the . Action on a that adds component registrations visible only in the new scope. A new lifetime scope. Gets the disposer associated with this . Component instances can be associated with it manually if required. Typical usage does not require interaction with this member- it is used when extending the container. Gets the tag applied to the . Tags allow a level in the lifetime hierarchy to be identified. In most applications, tags are not necessary. Fired when a new scope based on the current scope is beginning. Fired when this scope is ending. Fired when a resolve operation is beginning in this scope. When implemented by a component, an instance of the component will be resolved and started as soon as the container is built. Autofac will not call the Start() method when subsequent instances are resolved. If this behavior is required, use an OnActivated() event handler instead. For equivalent "Stop" functionality, implement . Autofac will always dispose a component before any of its dependencies (except in the presence of circular dependencies, in which case the components in the cycle are disposed in reverse-construction order.) Perform once-off startup processing. Base class for user-defined modules. Modules can add a set of related components to a container () or attach cross-cutting functionality to other components (. Modules are given special support in the XML configuration feature - see http://code.google.com/p/autofac/wiki/StructuringWithModules. Provides a user-friendly way to implement via . Defining a module: public class DataAccessModule : Module { public string ConnectionString { get; set; } public override void Load(ContainerBuilder moduleBuilder) { moduleBuilder.RegisterGeneric(typeof(MyRepository<>)) .As(typeof(IRepository<>)) .InstancePerMatchingLifetimeScope(WebLifetime.Request); moduleBuilder.Register(c => new MyDbConnection(ConnectionString)) .As<IDbConnection>() .InstancePerMatchingLifetimeScope(WebLifetime.Request); } } Using the module... var builder = new ContainerBuilder(); builder.RegisterModule(new DataAccessModule { ConnectionString = "..." }); var container = builder.Build(); var customers = container.Resolve<IRepository<Customer>>(); Apply the module to the component registry. Component registry to apply configuration to. Override to add registrations to the container. Note that the ContainerBuilder parameter is unique to this module. The builder through which components can be registered. Override to attach module-specific functionality to a component registration. This method will be called for all existing and future component registrations - ordering is not important. The component registry. The registration to attach functionality to. Override to perform module-specific processing on a registration source. This method will be called for all existing and future sources - ordering is not important. The component registry into which the source was added. The registration source. Gets the assembly in which the concrete module type is located. To avoid bugs whereby deriving from a module will change the target assembly, this property can only be used by modules that inherit directly from . Extension methods for registering instances with a container. Registers modules found in an assembly. The builder to register the modules with. The assemblies from which to register modules. Thrown if is . The to allow additional chained module registrations. Registers modules found in an assembly. The module registrar that will make the registrations into the container. The assemblies from which to register modules. Thrown if is . The to allow additional chained module registrations. Registers modules found in an assembly. The builder to register the modules with. The assemblies from which to register modules. The type of the module to add. Thrown if is . The to allow additional chained module registrations. Registers modules found in an assembly. The module registrar that will make the registrations into the container. The assemblies from which to register modules. The type of the module to add. Thrown if is . The to allow additional chained module registrations. Registers modules found in an assembly. The builder to register the modules with. The of the module to add. The assemblies from which to register modules. Thrown if or is . The to allow additional chained module registrations. Registers modules found in an assembly. The module registrar that will make the registrations into the container. The of the module to add. The assemblies from which to register modules. Thrown if or is . The to allow additional chained module registrations. Add a module to the container. The builder to register the module with. The module to add. Thrown if is . The to allow additional chained module registrations. Add a module to the container. The module registrar that will make the registration into the container. The module to add. Thrown if is . The to allow additional chained module registrations. Add a module to the container. The builder to register the module with. The module to add. Thrown if or is . The to allow additional chained module registrations. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Module.ThisAssembly is only available in modules that inherit directly from Module. It can't be used in '{0}' which inherits from '{1}'.. A parameter identified by name. When applied to a reflection-based component, will be matched against the name of the component's constructor arguments. When applied to a delegate-based component, the parameter can be accessed using . Component with parameter... public class MyComponent { public MyComponent(int amount) { ... } } Providing the parameter... var builder = new ContainerBuilder(); builder.RegisterType<MyComponent>(); var container = builder.Build(); var myComponent = container.Resolve<MyComponent>(new NamedParameter("amount", 123)); Gets the name of the parameter. Initializes a new instance of the class. The name of the parameter. The parameter value. Extension methods that simplify extraction of parameter values from an where T is . Each method returns the first matching parameter value, or throws an exception if none is provided. At configuration time, delegate registrations can retrieve parameter values using the methods , and : builder.Register((c, p) => new FtpClient(p.Named<string>("server"))); These parameters can be provided at resolution time: container.Resolve<FtpClient>(new NamedParameter("server", "ftp.example.com")); Alternatively, the parameters can be provided via a Generated Factory - http://code.google.com/p/autofac/wiki/DelegateFactories. Retrieve a named parameter value from a instance. The type to which the returned value will be cast. The available parameters to choose from. The name of the parameter to select. The value of the selected parameter. Retrieve a positional parameter value from a instance. The type to which the returned value will be cast. The available parameters to choose from. The zero-based position of the parameter to select. The value of the selected parameter. The position value is the one associated with the parameter when it was constructed, not its index into the sequence. Retrieve a typed parameter value from a instance. The type to which the returned value will be cast. The available parameters to choose from. The value of the selected parameter. A parameter that is identified according to an integer representing its position in an argument list. When applied to a reflection-based component, will be matched against the indices of the component's constructor arguments. When applied to a delegate-based component, the parameter can be accessed using . Component with parameter... public class MyComponent { public MyComponent(int amount) { ... } } Providing the parameter... var builder = new ContainerBuilder(); builder.RegisterType<MyComponent>(); var container = builder.Build(); var myComponent = container.Resolve<MyComponent>(new PositionalParameter(0, 123)); Gets the zero-based position of the parameter. Initializes a new instance of the class. The zero-based position of the parameter. The parameter value. Options that can be applied when autowiring properties on a component. (Multiple options can be specified using bitwise 'or' - e.g. AllowCircularDependencies | PreserveSetValues. Default behavior. Circular dependencies are not allowed; existing non-default property values are overwritten. Allows property-property and property-constructor circular dependency wiring. This flag moves property wiring from the Activating to the Activated event. If specified, properties that already have a non-default value will be left unchanged in the wiring operation. Adds registration syntax to the type. Add a component to the container. The builder to register the component with. The component to add. Add a registration source to the container. The builder to register the registration source via. The registration source to add. Register an instance as a component. The type of the instance. Container builder. The instance to register. Registration builder allowing the registration to be configured. If no services are explicitly specified for the instance, the static type will be used as the default service (i.e. *not* instance.GetType()). Register a component to be created through reflection. The type of the component implementation. Container builder. Registration builder allowing the registration to be configured. Register a component to be created through reflection. The type of the component implementation. Container builder. Registration builder allowing the registration to be configured. Register a delegate as a component. The type of the instance. Container builder. The delegate to register. Registration builder allowing the registration to be configured. Register a delegate as a component. The type of the instance. Container builder. The delegate to register. Registration builder allowing the registration to be configured. Register an un-parameterised generic type, e.g. Repository<>. Concrete types will be made as they are requested, e.g. with Resolve<Repository<int>>(). Container builder. The open generic implementation type. Registration builder allowing the registration to be configured. Specifies that the component being registered should only be made the default for services that have not already been registered. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Registration builder allowing the registration to be configured. Specifies that the components being registered should only be made the default for services that have not already been registered. Registration limit type. Registration style. Registration to set service mapping on. Registration builder allowing the registration to be configured. Register all types in an assembly. Container builder. The assemblies from which to register types. Registration builder allowing the registration to be configured. Register the types in a list. Container builder. The types to register. Registration builder allowing the registration to be configured. Specifies a subset of types to register from a scanned assembly. Registration limit type. Activator data type. Registration style. Registration to filter types from. Predicate that returns true for types to register. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a service. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Function mapping types to services. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a service. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Function mapping types to services. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a service. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Function mapping types to services. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a service. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Function mapping types to services. Registration builder allowing the registration to be configured. Specifies that a type from a scanned assembly provides its own concrete type as a service. Registration limit type. Registration to set service mapping on. Registration builder allowing the registration to be configured. Specifies that a type provides its own concrete type as a service. Registration limit type. Activator data type. Registration to set service mapping on. Registration builder allowing the registration to be configured. Specifies that a type provides its own concrete type as a service. Registration limit type. Registration to set service mapping on. Registration builder allowing the registration to be configured. Specify how a type from a scanned assembly provides metadata. Registration limit type. Activator data type. Registration style. Registration to set metadata on. A function mapping the type to a list of metadata items. Registration builder allowing the registration to be configured. Use the properties of an attribute (or interface implemented by an attribute) on the scanned type to provide metadata values. Inherited attributes are supported; however, there must be at most one matching attribute in the inheritance chain. The attribute applied to the scanned type. Registration to set metadata on. Registration builder allowing the registration to be configured. Specify how a type from a scanned assembly provides metadata. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Key of the metadata item. A function retrieving the value of the item from the component type. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a named service. Registration to set service mapping on. Service type provided by the component. Function mapping types to service names. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a named service. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Service type provided by the component. Function mapping types to service names. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a keyed service. Registration to set service mapping on. Service type provided by the component. Function mapping types to service keys. Registration builder allowing the registration to be configured. Specifies how a type from a scanned assembly is mapped to a keyed service. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. Service type provided by the component. Function mapping types to service keys. Registration builder allowing the registration to be configured. Specifies that a type from a scanned assembly is registered as providing all of its implemented interfaces. Registration limit type. Registration to set service mapping on. Registration builder allowing the registration to be configured. Specifies that a type is registered as providing all of its implemented interfaces. Registration limit type. Activator data type. Registration to set service mapping on. Registration builder allowing the registration to be configured. Specifies that a type is registered as providing all of its implemented interfaces. Registration limit type. Registration to set service mapping on. Registration builder allowing the registration to be configured. Set the policy used to find candidate constructors on the implementation type. Registration limit type. Activator data type. Registration style. Registration to set policy on. Policy to be used when searching for constructors. A registration builder allowing further configuration of the component. Set the policy used to find candidate constructors on the implementation type. Registration limit type. Activator data type. Registration style. Registration to set policy on. A function that returns the constructors to select from. A registration builder allowing further configuration of the component. Configure the component so that any properties whose types are registered in the container will be wired to instances of the appropriate service. Registration to auto-wire properties. Set wiring options such as circular dependency wiring support. A registration builder allowing further configuration of the component. Set the policy used to find candidate properties on the implementation type. Registration limit type. Activator data type. Registration style. Registration to set policy on. Policy to be used when searching for properties to inject. A registration builder allowing further configuration of the component. Set the policy used to select from available constructors on the implementation type. Registration limit type. Activator data type. Registration style. Registration to set policy on. Constructor signature to match. A registration builder allowing further configuration of the component. Set the policy used to select from available constructors on the implementation type. Registration limit type. Activator data type. Registration style. Registration to set policy on. Policy to be used when selecting a constructor. A registration builder allowing further configuration of the component. Set the policy used to select from available constructors on the implementation type. Registration limit type. Activator data type. Registration style. Registration to set policy on. Expression demonstrating how the constructor is called. A registration builder allowing further configuration of the component. Configure an explicit value for a constructor parameter. Registration limit type. Activator data type. Registration style. Registration to set parameter on. Name of a constructor parameter on the target type. Value to supply to the parameter.0 A registration builder allowing further configuration of the component. Configure an explicit value for a constructor parameter. Registration limit type. Activator data type. Registration style. Registration to set parameter on. The parameter to supply to the constructor. A registration builder allowing further configuration of the component. Configure an explicit value for a constructor parameter. Registration limit type. Activator data type. Registration style. Registration to set parameter on. A predicate selecting the parameter to set. The provider that will generate the parameter value. A registration builder allowing further configuration of the component. Configure explicit values for constructor parameters. Registration limit type. Activator data type. Registration style. Registration to set parameter on. The parameters to supply to the constructor. A registration builder allowing further configuration of the component. Configure an explicit value for a property. Registration limit type. Activator data type. Registration style. Registration to set property on. Name of a property on the target type. Value to supply to the property. A registration builder allowing further configuration of the component. Configure an explicit value for a property. Registration limit type. Activator data type. Registration style. Registration to set parameter on. The property to supply. A registration builder allowing further configuration of the component. Configure explicit values for properties. Registration limit type. Activator data type. Registration style. Registration to set parameter on. The properties to supply. A registration builder allowing further configuration of the component. Sets the target of the registration (used for metadata generation). The type of the limit. The type of the activator data. Registration style. Registration to set target for. The target. Registration builder allowing the registration to be configured. Thrown if or is . Provide a handler to be called when the component is registered. Registration limit type. Activator data type. Registration style. Registration add handler to. The handler. Registration builder allowing the registration to be configured. Provide a handler to be called when the component is registred. Registration limit type. Registration style. Registration add handler to. The handler. Registration builder allowing the registration to be configured. Specifies that a type from a scanned assembly is registered if it implements an interface that closes the provided open generic interface type. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. The open generic interface or base class type for which implementations will be found. Registration builder allowing the registration to be configured. Specifies that a type from a scanned assembly is registered if it implements an interface that closes the provided open generic interface type. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. The open generic interface or base class type for which implementations will be found. Key of the service. Registration builder allowing the registration to be configured. Specifies that a type from a scanned assembly is registered if it implements an interface that closes the provided open generic interface type. Registration limit type. Activator data type. Registration style. Registration to set service mapping on. The open generic interface or base class type for which implementations will be found. Function mapping types to service keys. Registration builder allowing the registration to be configured. Filters the scanned types to include only those assignable to the provided type. Registration limit type. Activator data type. Registration style. Registration to filter types from. The type or interface which all classes must be assignable from. Registration builder allowing the registration to be configured. Filters the scanned types to include only those assignable to the provided type. Registration to filter types from. The type or interface which all classes must be assignable from. Registration builder allowing the registration to be configured. Filters the scanned types to exclude the provided type. Registration to filter types from. The concrete type to exclude. Registration builder allowing the registration to be configured. Filters the scanned types to exclude the provided type, providing specific configuration for the excluded type. Registration to filter types from. Registration for the excepted type. The concrete type to exclude. Registration builder allowing the registration to be configured. Filters the scanned types to include only those in the namespace of the provided type or one of its sub-namespaces. Registration to filter types from. A type in the target namespace. Registration builder allowing the registration to be configured. Filters the scanned types to include only those in the provided namespace or one of its sub-namespaces. Registration limit type. Activator data type. Registration style. Registration to filter types from. The namespace from which types will be selected. Registration builder allowing the registration to be configured. Adapt all components implementing service to provide using the provided function. Service type to adapt from. Service type to adapt to. Must not be the same as . Container builder. Function adapting to service , given the context and parameters. Adapt all components implementing service to provide using the provided function. Service type to adapt from. Service type to adapt to. Must not be the same as . Container builder. Function adapting to service , given the context. Adapt all components implementing service to provide using the provided function. Service type to adapt from. Service type to adapt to. Must not be the same as . Container builder. Function adapting to service . Decorate all components implementing open generic service . The and parameters must be different values. Container builder. Service type being decorated. Must be an open generic type. Service key or name associated with the components being decorated. Service key or name given to the decorated components. The type of the decorator. Must be an open generic type, and accept a parameter of type , which will be set to the instance being decorated. Decorate all components implementing service using the provided function. The and parameters must be different values. Service type being decorated. Container builder. Function decorating a component instance that provides , given the context and parameters. Service key or name associated with the components being decorated. Service key or name given to the decorated components. Decorate all components implementing service using the provided function. The and parameters must be different values. Service type being decorated. Container builder. Function decorating a component instance that provides , given the context. Service key or name associated with the components being decorated. Service key or name given to the decorated components. Decorate all components implementing service using the provided function. The and parameters must be different values. Service type being decorated. Container builder. Function decorating a component instance that provides . Service key or name associated with the components being decorated. Service key or name given to the decorated components. Decorate all components implementing service with decorator service . Service type of the decorator. Must accept a parameter of type , which will be set to the instance being decorated. Service type being decorated. Container builder. A function that when provided with an instance determines if the decorator should be applied. Decorate all components implementing service with decorator service . Container builder. Service type of the decorator. Must accept a parameter of type , which will be set to the instance being decorated. Service type being decorated. A function that when provided with an instance determines if the decorator should be applied. Decorate all components implementing service using the provided function. Service type being decorated. Container builder. Function decorating a component instance that provides , given the context, parameters and service to decorate. A function that when provided with an instance determines if the decorator should be applied. Decorate all components implementing open generic service . Container builder. The type of the decorator. Must be an open generic type, and accept a parameter of type , which will be set to the instance being decorated. Service type being decorated. Must be an open generic type. A function that when provided with an instance determines if the decorator should be applied. Run a supplied action instead of disposing instances when they're no longer required. Registration limit type. Activator data type. Registration style. Registration to set release action for. An action to perform instead of disposing the instance. Registration builder allowing the registration to be configured. Only one release action can be configured per registration. Wraps a registration in an implicit and automatically activates the registration after the container is built. Registration to set release action for. Registration limit type. Activator data type. Registration style. A registration builder allowing further configuration of the component. While you can implement an to perform some logic at container build time, sometimes you need to just activate a registered component and that's it. This extension allows you to automatically activate a registration on container build. No additional logic is executed and the resolved instance is not held so container disposal will end up disposing of the instance. Depending on how you register the lifetime of the component, you may get an exception when you build the container - components that are scoped to specific lifetimes (like ASP.NET components scoped to a request lifetime) will fail to resolve because the appropriate lifetime is not available. Share one instance of the component within the context of a single web/HTTP/API request. Only available for integration that supports per-request dependencies (e.g., MVC, Web API, web forms, etc.). Registration limit type. Activator data type. Registration style. The registration to configure. Additional tags applied for matching lifetime scopes. A registration builder allowing further configuration of the component. Thrown if is . Attaches a predicate to evaluate prior to executing the registration. The predicate will run at registration time, not runtime, to determine whether the registration should execute. Registration limit type. Activator data type. Registration style. The registration to configure. The predicate to run to determine if the registration should be made. A registration builder allowing further configuration of the component. Thrown if or is . Thrown if has no reference to the original callback with which it was associated (e.g., it wasn't made with a standard registration method as part of a ). Attaches a predicate such that a registration will only be made if a specific service type is not already registered. The predicate will run at registration time, not runtime, to determine whether the registration should execute. Registration limit type. Activator data type. Registration style. The registration to configure. The service type to check for to determine if the registration should be made. Note this is the *service type* - the As<T> part. A registration builder allowing further configuration of the component. Thrown if or is . Thrown if has no reference to the original callback with which it was associated (e.g., it wasn't made with a standard registration method as part of a ). A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to A decorator for '{0}' was not provided with an instance parameter.. Looks up a localized string similar to The instance registration '{0}' can support SingleInstance() sharing only.. Looks up a localized string similar to A metadata attribute of type '{0}' was not found on '{1}'.. Looks up a localized string similar to More than one metadata attribute of type '{0}' was found on '{1}'.. Looks up a localized string similar to No matching constructor exists on type '{0}'.. Looks up a localized string similar to You can only attach a registration predicate to a registration that has a callback container attached (e.g., one that was made with a standard ContainerBuilder extension method).. Adds syntactic convenience methods to the interface. The name, provided when properties are injected onto an existing instance. Set any properties on that can be resolved in the context. Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. . Set any properties on that can be resolved in the context. Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. Optional parameters to use during the property injection. . Set any properties on that can be resolved in the context. Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. Optional parameters to use during the property injection. . Set any properties on that can be resolved by service and that satisfy the constraints imposed by . Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. Selector to determine with properties should be injected. . Set any properties on that can be resolved by service and that satisfy the constraints imposed by . Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. Selector to determine with properties should be injected. Optional parameters to use during the property injection. . Set any properties on that can be resolved by service and that satisfy the constraints imposed by . Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. Selector to determine with properties should be injected. Optional parameters to use during the property injection. . Set any null-valued properties on that can be resolved by the container. Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. . Set any null-valued properties on that can be resolved by the container. Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. Optional parameters to use during the property injection. . Set any null-valued properties on that can be resolved by the container. Type of instance. Used only to provide method chaining. The context from which to resolve the service. The instance to inject properties into. Optional parameters to use during the property injection. . Determine whether the specified service is available in the context. The context from which to resolve the service. The service to test for the registration of. True if the service is registered. Determine whether the specified service is available in the context. The context from which to resolve the service. The service to test for the registration of. True if the service is registered. Determine whether the specified service is available in the context. The context from which to resolve the service. The service to test for the registration of. True if the service is registered. Determine whether the specified service is available in the context. The context from which to resolve the service. The key of the service to test for the registration of. Type type of the service to test for the registration of. True if the service is registered. Determine whether the specified service is available in the context. The context from which to resolve the service. The key of the service to test for the registration of. Type type of the service to test for the registration of. True if the service is registered. Determine whether the specified service is available in the context. The context from which to resolve the service. The name of the service to test for the registration of. Type type of the service to test for the registration of. True if the service is registered. Determine whether the specified service is available in the context. The context from which to resolve the service. The name of the service to test for the registration of. Type type of the service to test for the registration of. True if the service is registered. Retrieve a service from the context. The service to retrieve. The context from which to resolve the service. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Parameters for the service. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Parameters for the service. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. The service type. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Parameters for the service. The service type. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Parameters for the service. The service type. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Key of the service. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Key of the service. The parameters. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Key of the service. The parameters. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Key of the service. Type of the service. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Key of the service. Type of the service. The parameters. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Key of the service. Type of the service. The parameters. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Name of the service. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Name of the service. The parameters. The component instance that provides the service. Retrieve a service from the context. The type to which the result will be cast. The context from which to resolve the service. Name of the service. The parameters. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. The service name. Type of the service. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Parameters for the service. The service name. Type of the service. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Parameters for the service. The service name. Type of the service. The component instance that provides the service. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. The type of the service. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The type of the service. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The type of the service. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. The name of the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The name of the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The key of the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. The name of the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The name of the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. Parameters for the service. The name of the service. The service to resolve. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. The service. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. The service. Parameters for the service. The component instance that provides the service, or null. Retrieve a service from the context, or null if the service is not registered. The context from which to resolve the service. The service. Parameters for the service. The component instance that provides the service, or null. Retrieve a service from the context. The context from which to resolve the service. The service to resolve. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Parameters for the service. The service to resolve. The component instance that provides the service. Retrieve a service from the context. The context from which to resolve the service. Parameters for the service. The service to resolve. The component instance that provides the service. Try to retrieve a service from the context. The service type to resolve. The context from which to resolve the service. The resulting component instance providing the service, or default(T). True if a component providing the service is available. Try to retrieve a service from the context. The context from which to resolve the service. The service type to resolve. The resulting component instance providing the service, or null. True if a component providing the service is available. Try to retrieve a service from the context. The context from which to resolve the service. The key of the service to resolve. The type of the service to resolve. The resulting component instance providing the service, or null. True if a component providing the service is available. Try to retrieve a service from the context. The context from which to resolve the service. The name of the service to resolve. The type of the service to resolve. The resulting component instance providing the service, or null. True if a component providing the service is available. Try to retrieve a service from the context. The context from which to resolve the service. The service to resolve. The resulting component instance providing the service, or null. True if a component providing the service is available. Try to retrieve a service from the context. The context from which to resolve the service. The service to resolve. The resulting component instance providing the service, or null. The parameters. True if a component providing the service is available. Thrown if is . Convenience filters for use with assembly scanning registrations. Filters scanned assembly types to be only the public types. Registration limit type. Activator data type. Registration style. Registration to filter types from. Registration builder allowing the registration to be configured. Extension methods for registering instances with a container. Add a registration source to the container. The builder to register the registration source with. The registration source to add. Thrown if is . The to allow additional chained registration source registrations. Add a registration source to the container. The source registrar that will make the registration into the container. The registration source to add. Thrown if is . The to allow additional chained registration source registrations. A parameter that can supply values to sites that exactly match a specified type. When applied to a reflection-based component, will be matched against the types of the component's constructor arguments. When applied to a delegate-based component, the parameter can be accessed using . Component with parameter... public class MyComponent { public MyComponent(int amount) { ... } } Providing the parameter... var builder = new ContainerBuilder(); builder.RegisterType<MyComponent>(); var container = builder.Build(); var myComponent = container.Resolve<MyComponent>(new TypedParameter(typeof(int), 123)); Gets the type against which targets are matched. Initializes a new instance of the class. The exact type to match. The parameter value. Shortcut for creating by using the . Type to be used for the parameter. The parameter value. New typed parameter. Extends with methods that are useful in building scanning rules for . Returns true if this type is in the namespace or one of its sub-namespaces. The type to test. The namespace to test. True if this type is in the namespace or one of its sub-namespaces; otherwise, false. Returns true if this type is in the same namespace as or one of its sub-namespaces. The type to test. True if this type is in the same namespace as or one of its sub-namespaces; otherwise, false. Determines whether the candidate type supports any base or interface that closes the provided generic type. The type to test. The open generic against which the type should be tested. Determines whether this type is assignable to . The type to test assignability to. The type to test. True if this type is assignable to references of type ; otherwise, False. Finds a constructor with the matching type parameters. The type being tested. The types of the contractor to find. The is a match is found; otherwise, null. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The type '{0}' is not an open generic class or interface type so it won't work with methods that act on open generics.. Extension methods for . Safely returns the set of loadable types from an assembly. The from which to load types. The set of types from the , or the subset of types that could be loaded if there was any error. Thrown if is . Base class for disposable objects. Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Releases unmanaged and - optionally - managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets a value indicating whether the current instance has been disposed. Helper methods used throughout the codebase. Enforce that sequence does not contain null. Returns the value if valid so that it can be used inline in base initialiser syntax. The value. The parameter name. Enforces that the provided object is non-null. The type of value being checked. The value. if not null. Enforce that an argument is not null or empty. Returns the value if valid so that it can be used inline in base initialiser syntax. The value. The description. if not null or empty. Enforce that the argument is a delegate type. The type to test. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The argument '{0}' cannot be empty.. Looks up a localized string similar to The object of type '{0}' cannot be null.. Looks up a localized string similar to Type {0} returns void.. Looks up a localized string similar to The sequence provided as argument '{0}' cannot contain null elements.. Looks up a localized string similar to Type {0} is not a delegate type.. Dictionary used to allow local property get/set and fall back to parent values. Storage for local values set in the dictionary. Initializes a new instance of the class with an empty parent. Initializes a new instance of the class with a specified parent. The parent dictionary to which values should fall back when not present in the current dictionary. Gets the number of elements contained in the dictionary. The number of elements contained in this collection plus the parent collection, minus overlapping key counts. Gets a value indicating whether this collection is read-only. Always returns . Gets an containing the keys of the dictionary. An containing the keys of the dictionary without duplicates. The order of the keys in the returned is unspecified, but it is guaranteed to be the same order as the corresponding values in the returned by the property. Gets the parent dictionary. The parent dictionary to which values should fall back when not present in the current dictionary. Gets an containing the values of the dictionary. An containing the values of the dictionary with overrides taken into account. The order of the keys in the returned is unspecified, but it is guaranteed to be the same order as the corresponding keys in the returned by the property. Gets or sets the with the specified key. The . The key. Changes made to this dictionary do not affect the parent. Adds an item to the dictionary. The object to add to the dictionary. Changes made to this dictionary do not affect the parent. Adds an element with the provided key and value to the dictionary. The object to use as the key of the element to add. The object to use as the value of the element to add. Changes made to this dictionary do not affect the parent. Thrown if is . Thrown if an element with the same key is already present in the local or parent dictionary. Removes all items from the dictionary. Does not clear parent entries, only local overrides. Determines whether the dictionary contains a specific value. The object to locate in the dictionary. if is found in the dictionary; otherwise, . Determines whether the dictionary contains an element with the specified key. The key to locate in the dictionary. if the dictionary or its parent contains an element with the key; otherwise, . Copies the elements of the dictionary to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from the dictionary. The must have zero-based indexing. The zero-based index in at which copying begins. Returns an enumerator that iterates through the collection. An enumerator that can be used to iterate through the collection. Removes the first occurrence of a specific object from the dictionary. The object to remove from the dictionary. if was successfully removed from the dictionary; otherwise, . This method also returns if is not found in the original dictionary. Changes made to this dictionary do not affect the parent. Removes the element with the specified key from the dictionary. The key of the element to remove. if the element is successfully removed; otherwise, . This method also returns if was not found in the original dictionary. Changes made to this dictionary do not affect the parent. Gets the value associated with the specified key. The key whose value to get. When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. if the dictionary or parent contains an element with the specified key; otherwise, . Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets the list of correctly ordered unique keys from the local and parent dictionaries. An with the unique set of all keys. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to Item has already been added with key '{0}'.. Extension methods for reflection-related types. Maps from a property-set-value parameter to the declaring property. Parameter to the property setter. The property info on which the setter is specified. True if the parameter is a property setter. Get a PropertyInfo object from an expression of the form x => x.P. Type declaring the property. The type of the property. Expression mapping an instance of the declaring type to the property value. Property info. Get the MethodInfo for a method called in the expression. Type on which the method is called. Expression demonstrating how the method appears. The method info for the called method. Gets the for the new operation called in the expression. The type on which the constructor is called. Expression demonstrating how the constructor is called. The for the called constructor. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to The provided expression must be of the form () =>new X(), but the provided expression was {0}.. Looks up a localized string similar to The provided expression must be of the form x =>x.M(), but the provided expression was {0}.. Looks up a localized string similar to The provided expression must be of the form x =>x.P, but the provided expression was {0}.. Adapts an action to the interface. Initializes a new instance of the class. The action to execute on disposal. A factory that retrieves the value on which the should be executed. Joins the strings into one single string interspersing the elements with the separator (a-la System.String.Join()). The elements. The separator. The joined string. Appends the item to the specified sequence. The type of element in the sequence. The sequence. The trailing item. The sequence with an item appended to the end. Prepends the item to the specified sequence. The type of element in the sequence. The sequence. The leading item. The sequence with an item prepended. Returns the first concrete interface supported by the candidate type that closes the provided open generic service type. The type that is being checked for the interface. The open generic type to locate. The type of the interface. Looks for an interface on the candidate type that closes the provided open generic interface type. The type that is being checked for the interface. The open generic service type to locate. True if a closed implementation was found; otherwise false. Signal attribute for static analysis that indicates a helper method is validating arguments for .