public void StopAll(CrossStitchCore core)
 {
     foreach (var module in _modules.Values)
     {
         module.Stop();
     }
 }
        public void AddMissingModules(CrossStitchCore core)
        {
            // These core modules are almost always auto-created and don't require warnings
            if (!_modules.ContainsKey(ModuleNames.Timer))
            {
                Add(new MessageTimerModule(core.MessageBus));
            }
            if (!_modules.ContainsKey(ModuleNames.StitchMonitor))
            {
                Add(new StitchMonitorModule(core, core.Configuration));
            }
            if (!_modules.ContainsKey(ModuleNames.Master))
            {
                Add(new MasterModule(core, core.Configuration));
            }

            // These modules are necessary for basic operation, but defaulting is not
            // straight-forward, so we need to raise a warning.
            if (!_modules.ContainsKey(ModuleNames.Data))
            {
                AddWithWarning(new DataModule(core.MessageBus, new InMemoryDataStorage()));
            }
        }