Ejemplo n.º 1
0
        public static void RegisterFileManager(this IServiceCollection services, IFileManagerConfiguration config)
        {
            // Register Configuration
            services.AddSingleton <IFileManagerConfiguration, FileManagerConfiguration>(provider => new FileManagerConfiguration()
            {
                Container   = config.Container,
                HostingPath = config.HostingPath,
                ServerUrl   = config.ServerUrl
            });

            // Register File Manager
            services.AddScoped <IFileManagerService, FileManagerService>();
        }
Ejemplo n.º 2
0
 public FileManagerService(IFileManagerConfiguration config)
 {
     this.configuration = config;
 }