Table of Contents

Interface IDependencyContainerScope

Namespace
Mokkit.Containers
Assembly
Mokkit.dll

Represents a scoped dependency injection container that provides service resolution within a specific scope. This interface extends System.IDisposable to ensure proper cleanup of scoped resources.

public interface IDependencyContainerScope : IDisposable

Implements

Methods

OnAsyncScopeEnter()

Notifies the scope that an asynchronous operation is entering the scope. This method is called to ensure proper scope management in async scenarios.

void OnAsyncScopeEnter()

TryResolve<T>()

Attempts to resolve a service of the specified type from the dependency injection container.

T? TryResolve<T>() where T : class

Returns

T?

An instance of the requested service type, or null if the service is not registered.

Type Parameters

T

The type of service to resolve. Must be a reference type.