LifetimeDescriptor
Represents a lifetime manager.
Through this property derived types can indicate that their expressions should be reused as a local variable in the final expression tree or not.
protected LifetimeDescriptor()
protected Expression BuildExpression(IContainerContext containerContext, IServiceRegistration serviceRegistration, ResolutionContext resolutionContext, Type resolveType)
Produces the expression which creates the instance managed by this LifetimeDescriptor.
public Expression GetExpression(IContainerContext containerContext, IServiceRegistration serviceRegistration, ResolutionContext resolutionContext, Type resolveType)
Produces the expression which manages the lifetime of the underlying instance.
protected Func<IResolutionScope, object> GetFactoryDelegate(IContainerContext containerContext, IServiceRegistration serviceRegistration, ResolutionContext resolutionContext, Type resolveType)
Gets the factory delegate for getting the instance managed by this LifetimeDescriptor.
protected abstract Expression GetLifetimeAppliedExpression(IContainerContext containerContext, IServiceRegistration serviceRegistration, ResolutionContext resolutionContext, Type resolveType)
Derived types are using this method to apply their lifetime to the instance creation.