Ejemplo n.º 1
0
 public TemplatePackageManager(IEngineEnvironmentSettings environmentSettings)
 {
     _environmentSettings = environmentSettings;
     _logger         = environmentSettings.Host.LoggerFactory.CreateLogger <TemplatePackageManager>();
     _paths          = new SettingsFilePaths(environmentSettings);
     _installScanner = new Scanner(environmentSettings);
 }
Ejemplo n.º 2
0
 public SettingsLoader(IEngineEnvironmentSettings environmentSettings, Action <IEngineEnvironmentSettings>?onFirstRun = null)
 {
     _environmentSettings = environmentSettings;
     _paths = new SettingsFilePaths(environmentSettings);
     _templatePackagesManager = new TemplatePackageManager(environmentSettings);
     _onFirstRun     = onFirstRun;
     _installScanner = new Scanner(environmentSettings);
 }
Ejemplo n.º 3
0
        public ComponentManager(IEngineEnvironmentSettings engineEnvironmentSettings)
        {
            _engineEnvironmentSettings = engineEnvironmentSettings;
            _paths    = new SettingsFilePaths(engineEnvironmentSettings);
            _settings = SettingsStore.Load(engineEnvironmentSettings, _paths);
            _loadLocations.AddRange(_settings.ProbingPaths);

            ReflectionLoadProbingPath.Reset();
            foreach (string loadLocation in _loadLocations)
            {
                ReflectionLoadProbingPath.Add(loadLocation);
            }

            _componentIdsByType = new Dictionary <Type, HashSet <Guid> >();

            foreach (KeyValuePair <string, HashSet <Guid> > bucket in _settings.ComponentTypeToGuidList)
            {
                Type interfaceType = Type.GetType(bucket.Key);
                if (interfaceType != null)
                {
                    _componentIdsByType[interfaceType] = bucket.Value;
                }
            }

            foreach (KeyValuePair <string, string> entry in _settings.ComponentGuidToAssemblyQualifiedName)
            {
                if (Guid.TryParse(entry.Key, out Guid componentId))
                {
                    _componentIdToAssemblyQualifiedTypeName[componentId] = entry.Value;
                }
            }

            foreach (var(interfaceType, instance) in engineEnvironmentSettings.Host.BuiltInComponents)
            {
                AddComponent(interfaceType, instance);
            }
        }
Ejemplo n.º 4
0
 public Scanner(IEngineEnvironmentSettings environmentSettings)
 {
     _environmentSettings = environmentSettings;
     _paths  = new SettingsFilePaths(environmentSettings);
     _logger = environmentSettings.Host.LoggerFactory.CreateLogger <Scanner>();
 }
Ejemplo n.º 5
0
 public AliasRegistry(IEngineEnvironmentSettings environmentSettings)
 {
     _environmentSettings = environmentSettings;
     _paths = new SettingsFilePaths(environmentSettings);
 }
 public Scanner(IEngineEnvironmentSettings environmentSettings)
 {
     _environmentSettings = environmentSettings;
     _paths = new SettingsFilePaths(environmentSettings);
 }