コード例 #1
0
        public ServiceHostService(
            StorageService storageService,
            PackageManagerService repositoryService,
            PythonScriptHostFactoryService pythonScriptHostFactoryService,
            SystemService systemService,
            SystemStatusService systemStatusService,
            ILogger <ServiceHostService> logger)
        {
            _repositoryService = repositoryService ?? throw new ArgumentNullException(nameof(repositoryService));
            _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
            _storageService = storageService ?? throw new ArgumentNullException(nameof(storageService));
            _logger         = logger ?? throw new ArgumentNullException(nameof(logger));

            if (systemStatusService == null)
            {
                throw new ArgumentNullException(nameof(systemStatusService));
            }
            systemStatusService.Set("service_host.service_count", () => _services.Count);

            if (systemService == null)
            {
                throw new ArgumentNullException(nameof(systemService));
            }
            systemService.StartupCompleted += (s, e) =>
            {
                StartDelayedServices();
            };
        }
コード例 #2
0
 public ScriptComponentLogic(
     PythonScriptHostFactoryService pythonScriptHostFactoryService,
     ComponentRegistryService componentRegistryService,
     ILogger <ScriptComponentLogic> logger)
 {
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
     _componentRegistryService       = componentRegistryService ?? throw new ArgumentNullException(nameof(componentRegistryService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #3
0
 public ComponentInitializerService(
     PythonScriptHostFactoryService pythonScriptHostFactoryService,
     RepositoryService repositoryService,
     ILoggerFactory loggerFactory)
 {
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
     _repositoryService = repositoryService ?? throw new ArgumentNullException(nameof(repositoryService));
     _loggerFactory     = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
 }
コード例 #4
0
 public StartupScriptsService(
     StorageService storageService,
     PythonScriptHostFactoryService pythonScriptHostFactoryService,
     ILogger <StartupScriptsService> logger)
 {
     _storageService = storageService ?? throw new ArgumentNullException(nameof(storageService));
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #5
0
        public ScriptComponentAdapter(PythonScriptHostFactoryService pythonScriptHostFactoryService, ComponentRegistryService componentRegistryService, ILoggerFactory loggerFactory)
        {
            _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
            _componentRegistryService       = componentRegistryService ?? throw new ArgumentNullException(nameof(componentRegistryService));

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }
            _logger = loggerFactory.CreateLogger <ScriptComponentAdapter>();
        }
コード例 #6
0
        public StartupScriptsService(StorageService storageService, PythonScriptHostFactoryService pythonScriptHostFactoryService, ILoggerFactory loggerFactory)
        {
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            _storageService = storageService ?? throw new ArgumentNullException(nameof(storageService));
            _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
            _logger = loggerFactory.CreateLogger <StartupScriptsService>();
        }
コード例 #7
0
 public ComponentInitializerService(
     PythonScriptHostFactoryService pythonScriptHostFactoryService,
     PackageManagerService packageManagerService,
     ILogger <ScriptComponentLogic> scriptComponentLogicLogger,
     ILogger <ScriptComponentAdapter> scriptComponentAdapterLogger)
 {
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
     _packageManagerService          = packageManagerService ?? throw new ArgumentNullException(nameof(packageManagerService));
     _scriptComponentLogicLogger     = scriptComponentLogicLogger ?? throw new ArgumentNullException(nameof(scriptComponentLogicLogger));
     _scriptComponentAdapterLogger   = scriptComponentAdapterLogger ?? throw new ArgumentNullException(nameof(scriptComponentAdapterLogger));
 }
コード例 #8
0
 public AutomationRegistryService(
     PackageManagerService packageManagerService,
     PythonScriptHostFactoryService pythonScriptHostFactoryService,
     StorageService storageService,
     MessageBusService messageBusService,
     ILogger <AutomationRegistryService> logger)
 {
     _packageManagerService          = packageManagerService ?? throw new ArgumentNullException(nameof(packageManagerService));
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
     _storageService    = storageService ?? throw new ArgumentNullException(nameof(storageService));
     _messageBusService = messageBusService ?? throw new ArgumentNullException(nameof(messageBusService));
     _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #9
0
        public AutomationRegistryService(
            RepositoryService repositoryService,
            PythonScriptHostFactoryService pythonScriptHostFactoryService,
            StorageService storageService,
            MessageBusService messageBusService,
            ILoggerFactory loggerFactory)
        {
            _repositoryService = repositoryService ?? throw new ArgumentNullException(nameof(repositoryService));
            _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
            _storageService    = storageService ?? throw new ArgumentNullException(nameof(storageService));
            _messageBusService = messageBusService ?? throw new ArgumentNullException(nameof(messageBusService));

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }
            _logger = loggerFactory.CreateLogger <AutomationRegistryService>();
        }
コード例 #10
0
        public StartupScriptsService(
            StorageService storageService,
            SystemService systemService,
            PythonScriptHostFactoryService pythonScriptHostFactoryService,
            ILogger <StartupScriptsService> logger)
        {
            if (systemService == null)
            {
                throw new ArgumentNullException(nameof(systemService));
            }
            systemService.StartupCompleted += (s, e) =>
            {
                OnStartupCompleted();
            };

            _storageService = storageService ?? throw new ArgumentNullException(nameof(storageService));
            _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
コード例 #11
0
        public ServiceHostService(
            StorageService storageService,
            RepositoryService repositoryService,
            PythonScriptHostFactoryService pythonScriptHostFactoryService,
            SystemStatusService systemStatusService,
            ILoggerFactory loggerFactory)
        {
            _repositoryService = repositoryService ?? throw new ArgumentNullException(nameof(repositoryService));
            _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
            _storageService = storageService ?? throw new ArgumentNullException(nameof(storageService));

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }
            _logger = loggerFactory.CreateLogger <ServiceHostService>();

            if (systemStatusService == null)
            {
                throw new ArgumentNullException(nameof(systemStatusService));
            }
            systemStatusService.Set("service_host.service_count", () => _services.Count);
        }
コード例 #12
0
 public PythonScratchpadController(PythonScriptHostFactoryService pythonScriptHostFactoryService)
 {
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
 }
コード例 #13
0
 public ToolsController(PythonScriptHostFactoryService pythonScriptHostFactoryService, PackageManagerService packageManagerService)
 {
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
     _packageManagerService          = packageManagerService ?? throw new ArgumentNullException(nameof(packageManagerService));
 }
コード例 #14
0
 public ToolsController(PythonScriptHostFactoryService pythonScriptHostFactoryService, RepositoryService repositoryService)
 {
     _pythonScriptHostFactoryService = pythonScriptHostFactoryService ?? throw new ArgumentNullException(nameof(pythonScriptHostFactoryService));
     _repositoryService = repositoryService ?? throw new ArgumentNullException(nameof(repositoryService));
 }