Table of Contents

Namespace Unity.Lifetime

Classes

ContainerControlledLifetimeManager

Unity returns the same instance each time the Resolve(...) method is called or when the dependency mechanism injects the instance into other classes.

ContainerControlledTransientManager

A special lifetime manager which works like TransientLifetimeManager, except container remembers all Disposable objects it created. Once container is disposed all these objects are disposed as well.

ExternallyControlledLifetimeManager

A LifetimeManager that holds a weak reference to it's managed instance.

HierarchicalLifetimeManager

A special lifetime manager which works like ContainerControlledLifetimeManager, except that in the presence of child containers, each child gets it's own instance of the object, instead of sharing one in the common parent.

LifetimeManager

Base class for all lifetime managers - classes that control how and when instances are created by the Unity container.

LifetimeManager.InvalidValue
PerResolveLifetimeManager

This is a custom lifetime manager that acts like TransientLifetimeManager, but also provides a signal to the default build plan, marking the type so that instances are reused across the build up object graph.

PerThreadLifetimeManager

A LifetimeManager that creates a new instance of the registered Type once per each thread.

SingletonLifetimeManager

Singleton lifetime creates globally unique singleton. Any Unity container tree (parent and all the children) is guaranteed to have only one global singleton for the registered type.

SynchronizedLifetimeManager

Base class for Lifetime managers which need to synchronize calls to GetValue(ILifetimeContainer).

TransientLifetimeManager

An LifetimeManager implementation that does nothing, thus ensuring that instances are created new every time.

Interfaces

IFactoryLifetimeManager

This interface marks all lifetime managers compatible with RegisterFactory(Type, string, Func<IUnityContainer, Type, string, object>, IFactoryLifetimeManager) registration.

IInstanceLifetimeManager

This interface marks all lifetime managers compatible with RegisterInstance(Type, string, object, IInstanceLifetimeManager) registration.

ILifetimeContainer

Represents a lifetime container.

ITypeLifetimeManager

This interface marks all lifetime managers compatible with RegisterType(Type, Type, string, ITypeLifetimeManager, params InjectionMember[]) registration.