Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="2.9.0-preview-515" />

 ScopedLifetimeBase

public abstract class ScopedLifetimeBase : LifetimeBase
Represents a shared base class for scoped lifetimes.
protected readonly int ScopeId

The id of the scope.

protected readonly object Sync

The object used to synchronization.

protected ScopedLifetimeBase()

public Expression GetFactoryExpression(IContainerContext containerContext, IServiceRegistration serviceRegistration, IObjectBuilder objectBuilder, ResolutionContext resolutionContext, Type resolveType)

Produces a factory expression to produce scoped instances.

public Expression StoreExpressionIntoLocalVariable(Expression expression, ResolutionContext resolutionContext, Type resolveType)

Stores the given expression in a local variable and saves it into the resolution context for further reuse.