public GreetingHostedService(ILogger <GreetingHostedService> logger, IOptions <SocketServerConfigInfo> socketServerConfigInfo)
 {
     _logger = logger;
     _socketServerConfigInfo = socketServerConfigInfo?.Value ?? throw new ArgumentNullException(nameof(socketServerConfigInfo));
     _logger.LogInformation("SocketServerConfigInfo: " + _socketServerConfigInfo.ToString());
 }
Exemplo n.º 2
0
        public SocketHostedService(ILogger <SocketHostedService> logger, IOptions <SocketServerConfigInfo> socketServerConfigInfo)
        {
            _logger = logger;
            _socketServerConfigInfo = socketServerConfigInfo?.Value ?? throw new ArgumentNullException(nameof(socketServerConfigInfo));

            _logger.LogInformation("Starting CyanSocketService with the following parameters: " + _socketServerConfigInfo.ToString());
        }