Пример #1
0
        public ModuleLoader(IAuthentication authentication, IDataService dataService, ILogger logger)
        {
            _authentication = authentication;
            _dataService    = dataService;
            _logger         = logger;

            BinPath  = Assembly.GetExecutingAssembly().Location;
            BinPath  = BinPath.Substring(0, BinPath.LastIndexOf('\\'));
            DataPath = CoreExtensionApplication._current.Configuration.AppData;

            _loadedModules = new Dictionary <string, Module>();

            _logger.Entry($"Loading modules from {BinPath} and {DataPath}.", Severity.Debug);
            if (CoreExtensionApplication._current.Configuration.EnableModuleUpdate)
            {
                ProcessManifest();
            }
        }
Пример #2
0
        public ModuleLoader(IAuthentication authentication, ILogger <CoreExtensionApplication> logger, IConfiguration config)
        {
            _authentication = authentication;
            _logger         = logger;
            _config         = config;

            BinPath  = Assembly.GetExecutingAssembly().Location;
            BinPath  = BinPath.Substring(0, BinPath.LastIndexOf('\\'));
            DataPath = _config["AppData"];

            _loadedModules = new Dictionary <string, Module>();

            _logger.LogDebug($"Loading modules from {BinPath} and {DataPath}.");

            /*if (_config.EnableModuleUpdate)
             * {
             *  ProcessManifest();
             * }*/
        }