Example #1
0
        /// <summary>Initializes and register's Alfred's subsystems</summary>
        private void InitializeSubsystems()
        {
            // Log header
            _console?.Log(LogHeader, "Initializing subsystems", LogLevel.Verbose);

            // Init Core
            _alfredCoreSubsystem = new AlfredCoreSubsystem(Container);
            _alfredCoreSubsystem.RegisterAsProvidedInstance(Container);
            _alfred.Register(_alfredCoreSubsystem);

            // Initialize System Monitor
            InitializeSystemMonitoringSubsystem();

            // Initialize Chat
            _chatSubsystem = new ChatSubsystem(Container, _alfred.Name);
            _chatSubsystem.RegisterAsProvidedInstance(Container);
            _alfred.Register(_chatSubsystem);

            // Initialize Mind Explorer
            _mindExplorerSubsystem = new MindExplorerSubsystem(Container,
                                                               Options.ShowMindExplorerPage);
            _mindExplorerSubsystem.RegisterAsProvidedInstance(Container);
            _alfred.Register(_mindExplorerSubsystem);

            // Add any dynamic subsystems
            foreach (var subsystem in Options.AdditionalSubsystems) { _alfred.Register(subsystem); }
        }
        public override void SetUp()
        {
            base.SetUp();

            var bootstrapper = new AlfredBootstrapper(Container);
            _alfred = bootstrapper.Create();

            _subsystem = new MindExplorerSubsystem(Container, true);

            _page = _subsystem.MindExplorerPage;
        }