/// <summary> /// Initializes a new instance of the <see cref="LockdownClient"/> class. /// </summary> /// <param name="stream"> /// A <see cref="Stream"/> which represents the connection to the lockdown client. /// </param> /// <param name="logger"> /// A <see cref="ILogger"/> which can be used when logging. /// </param> public LockdownClient(Stream stream, ILogger <LockdownClient> logger) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.protocol = new LockdownProtocol(stream, ownsStream: true, logger); }
/// <summary> /// Initializes a new instance of the <see cref="LockdownClient"/> class. /// </summary> /// <param name="protocol"> /// A <see cref="LockdownProtocol"/> which represents the connection to the lockdown client. /// </param> /// <param name="logger"> /// A <see cref="ILogger"/> which can be used when logging. /// </param> public LockdownClient(LockdownProtocol protocol, ILogger <LockdownClient> logger) { this.protocol = protocol ?? throw new ArgumentNullException(nameof(protocol)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }