Esempio n. 1
0
        public List <PluginAnalysis> BeforehandLoad(string fileName)
        {
            string dir      = GetBaseDirectory();
            string savePath = dir + fileName;

            if (System.IO.File.Exists(savePath))
            {
                var pluginAnalysis = PluginAnalysisHelper.GetPluginAnalysis(savePath);
                return(pluginAnalysis);
            }
            return(null);
        }
Esempio n. 2
0
        public async Task <List <PluginAnalysis> > BeforehandLoad(IFormFile file)
        {
            if (file != null)
            {
                string dir      = GetTempDirectory();
                string savePath = dir + file.FileName;
                var    result   = await file.SaveAs(savePath, _settingFinder, _webHelper).ConfigureAwait(false);

                while (System.IO.File.Exists(result.FilePath))
                {
                    var pluginAnalysis = PluginAnalysisHelper.GetPluginAnalysis(result.FilePath);
                    return(pluginAnalysis);
                }
            }
            return(null);
        }