public void AddServices(IServiceCollection serviceCollection, IConfiguration configuration)
        {
            var options = new FileMediaProviderOptions();

            configuration.GetSection("media:provider:options").Bind(options);

            serviceCollection.AddSingleton(options);
            serviceCollection.AddScoped <IMediaHandler, FileMediaHandler>();
        }
Beispiel #2
0
 public FileMediaHandler(FileMediaProviderOptions options, IHttpContextAccessor httpContextAccessor, AthenaData data)
 {
     this.options             = options;
     this.httpContextAccessor = httpContextAccessor;
     this.data = data;
 }