Table of Contents

Class BagContainer

Namespace
Mokkit.Containers.Bag
Assembly
Mokkit.Containers.Bag.dll

A minimal dependency container that resolves objects by their registered type. It performs no auto-wiring and has no external DI dependency: singletons are stored as-is and shared across scopes, while factory registrations produce one value per scope that is disposed when the scope ends.

public class BagContainer : BaseDependencyContainer, IDependencyContainer

Inheritance

Implements

Inherited Members

Methods

BeginScope(TestHostContext)

Creates a new resolution scope. Singleton registrations resolve to the shared instance; factory registrations produce (and cache) one value for the lifetime of the returned scope.

public IDependencyContainerScope BeginScope(TestHostContext context)

Parameters

context TestHostContext

The test host context (unused — the bag has no per-context state).

Returns

IDependencyContainerScope

A new Mokkit.Containers.IDependencyContainerScope.