Files
Slim/Slim.Integration/ServiceCollection/ServiceScope.cs
T
amacocian e8adfa1acc Slim Integration with Microsoft.Extensions.DependencyInjection (#20)
* Setup integration with Microsoft.Extensions.DependencyInjection

* Setup Slim integration project with Microsoft.Extensions.DependencyInjection
2022-09-09 14:26:25 +02:00

18 lines
384 B
C#

using System;
using Microsoft.Extensions.DependencyInjection;
namespace Slim.Integration.ServiceCollection;
public sealed class ServiceScope : IServiceScope
{
public System.IServiceProvider ServiceProvider { get; set; }
public void Dispose()
{
if (this.ServiceProvider is IDisposable disposable)
{
disposable.Dispose();
}
}
}