using Microsoft.Extensions.DependencyInjection;
namespace Femto.Modules.Auth.Application;
///
/// We use this to bind a scope to the request scope in the composition root
/// Any scoped services provided by this subcontainer should be accessed via a ScopeBinding injected in the host
///
///
public class ScopeBinding(IServiceScope scope) : IDisposable
{
public T GetService() where T : notnull => scope.ServiceProvider.GetRequiredService();
public void Dispose() => scope.Dispose();
}