Stashbox by Peter Csajtai

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

 IResolutionScope

public interface IResolutionScope : IDisposable
bool HasScopedInstances { get; }

object Name { get; }

TDisposable AddDisposableTracking<TDisposable>(TDisposable disposable) where TDisposable : IDisposable

void AddScopedInstance(Type key, object value, object name = null)

TService AddWithFinalizer<TService>(TService finalizable, Action<TService> finalizer)

object GetOrAddScopedItem(int key, object sync, Func<IResolutionScope, object> factory)

object GetScopedInstanceOrDefault(Type key, object name = null)