Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="4.2.0-preview-682" />

 ResolutionContext

Represents information about the actual resolution flow.

The context of the current container instance.

The currently resolving scope.

public bool IsRequestedFromRoot { get; }

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

public bool NullResultAllowed { get; }

True if null result is allowed, otherwise false.

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

public object GetDependencyOverrideOrDefault(Type dependencyType)

Returns a dependency override for a given type.

public TResult GetDependencyOverrideOrDefault<TResult>()

Returns a dependency override for a given type.

Gets an already defined global variable.