Files
mixtape/zero.Core/FileStorage/ServiceCollectionExtensions.cs
T

13 lines
390 B
C#
Raw Normal View History

2021-11-23 22:56:22 +01:00
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace zero.FileStorage;
internal static class ServiceCollectionExtensions
{
public static IServiceCollection AddZeroFileStorage(this IServiceCollection services)
{
services.AddScoped<IPaths>(factory => new Paths(factory.GetService<IWebHostEnvironment>(), true));
return services;
}
}