static ApplicationPartManagerExtensions() { //we use the default file provider, since the DI isn't initialized yet _fileProvider = CommonHelper.DefaultFileProvider; _baseAppLibraries = new List <string>(); //get all libraries from /bin/{version}/ directory _baseAppLibraries.AddRange(_fileProvider.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.dll") .Select(fileName => _fileProvider.GetFileName(fileName))); //get all libraries from base site directory if (!AppDomain.CurrentDomain.BaseDirectory.Equals(Environment.CurrentDirectory, StringComparison.InvariantCultureIgnoreCase)) { _baseAppLibraries.AddRange(_fileProvider.GetFiles(Environment.CurrentDirectory, "*.dll") .Select(fileName => _fileProvider.GetFileName(fileName))); } //get all libraries from refs directory //var refsPathName = _fileProvider.Combine(Environment.CurrentDirectory, NopPluginDefaults.RefsPathName); //if (_fileProvider.DirectoryExists(refsPathName)) //{ // _baseAppLibraries.AddRange(_fileProvider.GetFiles(refsPathName, "*.dll") // .Select(fileName => _fileProvider.GetFileName(fileName))); //} }
public WebHelper(HostingConfig hostingConfig, IActionContextAccessor actionContextAccessor, IHostApplicationLifetime hostApplicationLifetime, IHttpContextAccessor httpContextAccessor, IAnyFileProvider fileProvider, IUrlHelperFactory urlHelperFactory) { _hostingConfig = hostingConfig; _actionContextAccessor = actionContextAccessor; _hostApplicationLifetime = hostApplicationLifetime; _httpContextAccessor = httpContextAccessor; _fileProvider = fileProvider; _urlHelperFactory = urlHelperFactory; }
public WebAppTypeFinder(IAnyFileProvider fileProvider = null) : base(fileProvider) { }
public AppDomainTypeFinder(IAnyFileProvider fileProvider = null) { _fileProvider = fileProvider ?? CommonHelper.DefaultFileProvider; }