Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of <see cref="Connector"/>
 /// </summary>
 /// <param name="configuration"><see cref="ConnectorConfiguration"/> holding all configuration</param>
 /// <param name="logger"><see cref="ILogger"/> for logging</param>
 /// <param name="parser"><see cref="IParser"/> for dealing with the actual parsing</param>
 public Connector(
     ConnectorConfiguration configuration,
     ILogger logger,
     IParser parser)
 {
     _logger        = logger;
     _parser        = parser;
     _configuration = configuration;
     _logger.Information($"Will connect to '{configuration.Ip}:{configuration.Port}'");
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="Connector"/>
 /// </summary>
 /// <param name="configuration"><see cref="ConnectorConfiguration"/> holding all configuration</param>
 /// <param name="logger"><see cref="ILogger"/> for logging</param>
 /// <param name="parser"><see cref="IParser"/> for dealing with the actual parsing</param>
 public Connector(
     ConnectorConfiguration configuration,
     ILogger logger,
     IParser parser)
 {
     _logger        = logger;
     _parser        = parser;
     _subscribers   = new ConcurrentBag <Action <Channel> >();
     _configuration = configuration;
     _logger.Information($"Will connect to '{configuration.Ip}:{configuration.Port}'");
 }