Пример #1
0
        public IActionResult Upload()
        {
            PluginPackage package = new PluginPackage(Request.GetPluginStream(), _dbConnectionFactory);

            _pluginManager.AddPlugins(package);
            return(RedirectToAction("Index"));
        }
Пример #2
0
        public IActionResult Upload()
        {
            var package = new PluginPackage(Request.Form.Files.First().OpenReadStream());

            _pluginManager.AddPlugins(package);

            return(RedirectToAction("Index"));
        }
Пример #3
0
        public IActionResult Install([FromBody] SetupModulesModel model)
        {
            if (model != null && model.Modules != null)
            {
                foreach (string module in model.Modules)
                {
                    using (FileStream fs = new FileStream(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, GlobalConst.PresetFolder, module), FileMode.Open))
                    {
                        _pluginManager.AddPlugins(new Core.DomainModel.PluginPackage(fs, _dbHelper));
                    }
                }
            }

            _systemManager.MarkAsInstalled();

            return(Ok());
        }