Table of Contents

Class StageResolve

Namespace
Mokkit.Containers
Assembly
Mokkit.dll

Resolves services from the test host bag. DI container adapters register this as their Mokkit.Containers.IStageResolve implementation so stage-provided instances (e.g. mocks) can be injected into the real graph.

public class StageResolve : IStageResolve

Inheritance

Implements

Inherited Members

Constructors

StageResolve(ITestHostBagAccessor)

Initializes a new instance of the Mokkit.Containers.StageResolve class with the specified test host bag accessor.

public StageResolve(ITestHostBagAccessor testHostBagAccessor)

Parameters

testHostBagAccessor ITestHostBagAccessor

The test host bag accessor for accessing shared test resources.

Methods

Resolve(Type)

Resolves a service of the specified type from the test host bag.

public object? Resolve(Type serviceType)

Parameters

serviceType Type

The type of service to resolve.

Returns

object?

An instance of the requested service type from the test host bag, or null if not found.

Exceptions

InvalidOperationException

Thrown when the test host bag is missing, indicating a corrupt resolver state.