Exemple #1
0
        public YamlAppConfig(IEnumerable <Type> types, TextReader reader, IYamlConfig yamlConfig, string yamlFilePath)
        {
            _types      = types;
            _yamlStream = new YamlStream();
            _yamlStream.Load(reader);

            _yamlConfig   = yamlConfig;
            _yamlFilePath = yamlFilePath;
        }
Exemple #2
0
 public RunnerService(
     ILoggerFactory loggerFactory,
     IOptions <NetDaemonSettings> netDaemonSettings,
     IOptions <HomeAssistantSettings> homeAssistantSettings,
     IServiceProvider serviceProvider,
     IYamlConfig yamlConfig,
     IDaemonAppCompiler daemonAppCompiler
     )
 {
     _logger = loggerFactory.CreateLogger <RunnerService>();
     _homeAssistantSettings = homeAssistantSettings.Value;
     _netDaemonSettings     = netDaemonSettings.Value;
     _serviceProvider       = serviceProvider;
     _yamlConfig            = yamlConfig;
     _daemonAppCompiler     = daemonAppCompiler;
 }
 public RunnerService(
     ILoggerFactory loggerFactory,
     IOptions <NetDaemonSettings> netDaemonSettings,
     IOptions <HomeAssistantSettings> homeAssistantSettings,
     IServiceProvider serviceProvider,
     IYamlConfig yamlConfig,
     IDaemonAppCompiler daemonAppCompiler
     )
 {
     _ = homeAssistantSettings ??
         throw new NetDaemonArgumentNullException(nameof(homeAssistantSettings));
     _ = netDaemonSettings ??
         throw new NetDaemonArgumentNullException(nameof(netDaemonSettings));
     _logger = loggerFactory.CreateLogger <RunnerService>();
     _homeAssistantSettings = homeAssistantSettings.Value;
     _netDaemonSettings     = netDaemonSettings.Value;
     _serviceProvider       = serviceProvider;
     _yamlConfig            = yamlConfig;
     _daemonAppCompiler     = daemonAppCompiler;
 }
Exemple #4
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="daemonAppTypes">App compiled app types</param>
 /// <param name="logger">ILogger instance to use</param>
 /// <param name="yamlConfig"></param>
 public CodeManager(IEnumerable <Type> daemonAppTypes, ILogger logger, IYamlConfig yamlConfig)
 {
     _logger           = logger;
     _loadedDaemonApps = daemonAppTypes;
     _yamlConfig       = yamlConfig;
 }