Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.1.0-preview-525" />

 ResolutionContext

public class ResolutionContext
Represents information about the actual resolution flow.

The currently resolving scope.

public bool NullResultAllowed { get; }

True if null result is allowed, otherwise false.

public static ResolutionContext New(IResolutionScope scope, bool nullResultAllowed = false, object[] dependencyOverrides = null)

Static factory for ResolutionContext.

public void AddDefinedVariable(object 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

Gets an already defined global variable.