示例#1
0
        public void Initialize()
        {
            if (IsInitialized)
            {
                throw new ArtemisCoreException("Cannot initialize the core as it is already initialized.");
            }

            AssemblyInformationalVersionAttribute?versionAttribute = typeof(CoreService).Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>();

            _logger.Information("Initializing Artemis Core version {version}", versionAttribute?.InformationalVersion);
            ApplyLoggingLevel();

            DeserializationLogger.Initialize(Kernel);

            // Initialize the services
            _pluginService.CopyBuiltInPlugins();
            _pluginService.LoadPlugins(StartupArguments.Contains("--ignore-plugin-lock"));

            ArtemisSurface surfaceConfig = _surfaceService.ActiveSurface;

            if (surfaceConfig != null)
            {
                _logger.Information("Initialized with active surface entity {surfaceConfig}-{guid}", surfaceConfig.Name, surfaceConfig.EntityId);
            }
            else
            {
                _logger.Information("Initialized without an active surface entity");
            }

            PlayIntroAnimation();
            OnInitialized();
        }
示例#2
0
        private async Task Initialize()
        {
            if (IsInitialized)
            {
                throw new ArtemisCoreException("Cannot initialize the core as it is already initialized.");
            }

            _logger.Information("Initializing Artemis Core version {version}", typeof(CoreService).Assembly.GetName().Version);

            // Initialize the services
            await Task.Run(() => _pluginService.CopyBuiltInPlugins());

            await Task.Run(() => _pluginService.LoadPlugins());

            var surfaceConfig = _surfaceService.ActiveSurface;

            if (surfaceConfig != null)
            {
                _logger.Information("Initialized with active surface entity {surfaceConfig}-{guid}", surfaceConfig.Name, surfaceConfig.EntityId);
            }
            else
            {
                _logger.Information("Initialized without an active surface entity");
            }

            OnInitialized();
        }
示例#3
0
        private async Task Initialize()
        {
            if (IsInitialized)
            {
                throw new ArtemisCoreException("Cannot initialize the core as it is already initialized.");
            }

            _logger.Information("Initializing Artemis Core version {version}", typeof(CoreService).Assembly.GetName().Version);

            // Initialize the services
            await Task.Run(() => _pluginService.CopyBuiltInPlugins());

            await Task.Run(() => _pluginService.LoadPlugins());

            OnInitialized();
        }