Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="5.5.1" />

 ResolutionContext

public class ResolutionContext
Represents information about the actual resolution flow.

The context of the current container instance.

The currently resolving scope.

public readonly bool IsRequestedFromRoot

When it's true, it indicates that the current resolution request was made from the root scope.

public readonly bool NullResultAllowed

True if null result is allowed, otherwise false.

The currently resolving scope.

public void AddDefinedVariable(int key, ParameterExpression parameter)

Adds a global keyed variable to the compiled expression tree.

public void AddDefinedVariable(ParameterExpression parameter)

Adds a global variable to the compiled expression tree.

public void AddInstruction(Expression instruction)

Adds a custom expression to the instruction list