UnityContainer Methods

Include Protected Members
Include Inherited Members

The UnityContainer type exposes the following members.

Methods

  Name Description
Public method AddExtension
Add an extension object to the container.
Public method BuildUp
Run an existing object through the container and perform injection on it.
Public method Configure
Get access to a configuration interface exposed by an extension.
Public method CreateChildContainer
Create a child container.
Public method Dispose()
Dispose this container instance.
Protected method Dispose(Boolean)
Dispose this container instance.
Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method RegisterInstance
RegisterType an instance with the container.
Public method RegisterType
RegisterType a type mapping with the container, where the created instances will use the given LifetimeManager.
Public method RemoveAllExtensions
Remove all installed extensions from this container.
Public method Resolve
Get an instance of the requested type with the given name from the container.
Public method ResolveAll
Return instances of all registered types requested.
Public method Teardown
Run an existing object through the container, and clean it up.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)

Extension Methods

  Name Description
Public Extension Method AddNewExtension<TExtension>
Creates a new extension object and adds it to the container.
(Defined by UnityContainerExtensions.)
Public Extension Method BuildUp(Type, Object, array<ResolverOverride[]) Overloaded.
Run an existing object through the container and perform injection on it.
(Defined by UnityContainerExtensions.)
Public Extension Method BuildUp<T>(T, array<ResolverOverride[]) Overloaded.
Run an existing object through the container and perform injection on it.
(Defined by UnityContainerExtensions.)
Public Extension Method BuildUp<T>(T, String, array<ResolverOverride[]) Overloaded.
Run an existing object through the container and perform injection on it.
(Defined by UnityContainerExtensions.)
Public Extension Method Configure<TConfigurator>
Resolve access to a configuration interface exposed by an extension.
(Defined by UnityContainerExtensions.)
Public Extension Method IsRegistered(Type) Overloaded.
Check if a particular type has been registered with the container with the default name.
(Defined by UnityContainerExtensions.)
Public Extension Method IsRegistered(Type, String) Overloaded.
Check if a particular type/name pair has been registered with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method IsRegistered<T>() Overloaded.
Check if a particular type has been registered with the container with the default name.
(Defined by UnityContainerExtensions.)
Public Extension Method IsRegistered<T>(String) Overloaded.
Check if a particular type/name pair has been registered with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method LoadConfiguration() Overloaded.
Apply configuration from the default section and unnamed container element.
(Defined by UnityContainerExtensions.)
Public Extension Method LoadConfiguration(String) Overloaded.
Apply configuration from the default section (named "unity" pulled out of ConfigurationManager) and the named container.
(Defined by UnityContainerExtensions.)
Public Extension Method LoadConfiguration(UnityConfigurationSection) Overloaded.
Apply configuration from the default container in the given section.
(Defined by UnityContainerExtensions.)
Public Extension Method LoadConfiguration(UnityConfigurationSection, String) Overloaded.
Apply configuration from the given section and named container into the given container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterInstance(Type, Object) Overloaded.
Register an instance with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterInstance(Type, Object, LifetimeManager) Overloaded.
Register an instance with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterInstance(Type, String, Object) Overloaded.
Register an instance with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterInstance<TInterface>(TInterface) Overloaded.
Register an instance with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterInstance<TInterface>(TInterface, LifetimeManager) Overloaded.
Register an instance with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterInstance<TInterface>(String, TInterface) Overloaded.
Register an instance with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterInstance<TInterface>(String, TInterface, LifetimeManager) Overloaded.
Register an instance with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType(Type, array<InjectionMember[]) Overloaded.
Register a type with specific members to be injected.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType(Type, Type, array<InjectionMember[]) Overloaded.
Register a type mapping with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType(Type, LifetimeManager, array<InjectionMember[]) Overloaded.
Register a LifetimeManager for the given type and name with the container. No type mapping is performed for this type.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType(Type, String, array<InjectionMember[]) Overloaded.
Register a LifetimeManager for the given type and name with the container. No type mapping is performed for this type.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType(Type, Type, String, array<InjectionMember[]) Overloaded.
Register a type mapping with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType(Type, Type, LifetimeManager, array<InjectionMember[]) Overloaded.
Register a type mapping with the container, where the created instances will use the given LifetimeManager.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType(Type, String, LifetimeManager, array<InjectionMember[]) Overloaded.
Register a LifetimeManager for the given type and name with the container. No type mapping is performed for this type.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<T>(array<InjectionMember[]) Overloaded.
Register a type with specific members to be injected.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<T>(String, array<InjectionMember[]) Overloaded.
Register a LifetimeManager for the given type with the container. No type mapping is performed for this type.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<T>(LifetimeManager, array<InjectionMember[]) Overloaded.
Register a LifetimeManager for the given type with the container. No type mapping is performed for this type.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<T>(String, LifetimeManager, array<InjectionMember[]) Overloaded.
Register a LifetimeManager for the given type and name with the container. No type mapping is performed for this type.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<TFrom, TTo>(array<InjectionMember[]) Overloaded.
Register a type mapping with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<TFrom, TTo>(String, array<InjectionMember[]) Overloaded.
Register a type mapping with the container.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<TFrom, TTo>(LifetimeManager, array<InjectionMember[]) Overloaded.
Register a type mapping with the container, where the created instances will use the given LifetimeManager.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterType<TFrom, TTo>(String, LifetimeManager, array<InjectionMember[]) Overloaded.
Register a type mapping with the container, where the created instances will use the given LifetimeManager.
(Defined by UnityContainerExtensions.)
Public Extension Method RegisterTypes(RegistrationConvention, Boolean) Overloaded.
Registers the types according to the convention.
(Defined by UnityContainerRegistrationByConventionExtensions.)
Public Extension Method RegisterTypes(IEnumerable<Type>, Func<Type, IEnumerable<Type>>, Func<Type, String>, Func<Type, LifetimeManager>, Func<Type, IEnumerable<InjectionMember>>, Boolean) Overloaded.
Registers the supplied types by using the specified rules for name, lifetime manager, injection members, and registration types.
(Defined by UnityContainerRegistrationByConventionExtensions.)
Public Extension Method Resolve(Type, array<ResolverOverride[]) Overloaded.
Resolve an instance of the default requested type from the container.
(Defined by UnityContainerExtensions.)
Public Extension Method Resolve<T>(array<ResolverOverride[]) Overloaded.
Resolve an instance of the default requested type from the container.
(Defined by UnityContainerExtensions.)
Public Extension Method Resolve<T>(String, array<ResolverOverride[]) Overloaded.
Resolve an instance of the requested type with the given name from the container.
(Defined by UnityContainerExtensions.)
Public Extension Method ResolveAll<T>
Return instances of all registered types requested.
(Defined by UnityContainerExtensions.)

See Also

UnityContainer Class

Microsoft.Practices.Unity Namespace