public UploadController(IWebHostEnvironment env, IWebHostEnvironment webHostEnvironment, PathOptions pathOptions, IWsiStorageService wsiStorageService, WsiDbService wsiDbService)
 {
     _hostingEnv         = env;
     _webHostEnvironment = webHostEnvironment;
     _pathOptions        = pathOptions;
     _wsiStorageService  = wsiStorageService;
     _wsiDbService       = wsiDbService;
 }
示例#2
0
        public WsiStorageServiceLocal(IServiceProvider serviceProvider)
        {
            _pathOptions  = serviceProvider.GetService <PathOptions>();
            _wsiProcessor = serviceProvider.GetService <IWsiProcessor>();
            _wsiDbService = serviceProvider.GetService <WsiDbService>();

            if (!System.IO.Directory.Exists(_pathOptions.WsiBasePath))
            {
                System.IO.Directory.CreateDirectory(_pathOptions.WsiBasePath);
            }
        }