public MacroRegistryService( StorageService storageService, MessageBusService messageBusService, SystemStatusService systemStatusService, ComponentRegistryService componentRegistryService, ILogger <MacroRegistryService> logger) { _storageService = storageService ?? throw new ArgumentNullException(nameof(storageService)); _messageBusService = messageBusService ?? throw new ArgumentNullException(nameof(messageBusService)); _componentRegistryService = componentRegistryService ?? throw new ArgumentNullException(nameof(componentRegistryService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); if (systemStatusService == null) { throw new ArgumentNullException(nameof(systemStatusService)); } systemStatusService.Set("macro_registry.count", () => _macros.Count); _messageBusWrapper = new MacroRegistryMessageBusWrapper(_messageBusService); }