private S101Robot(S101Client client, EmberTypeBag types, XmlReader logReader, bool sendFirstMessage) { this.client = client ?? throw new ArgumentNullException(nameof(client)); this.logReader = new S101LogReader(types, logReader); this.sendFirstMessage = sendFirstMessage; this.client.OutOfFrameByteReceived += this.OnOutOfFrameByteReceived; this.client.EmberDataReceived += this.OnClientEmberDataReceived; this.client.ConnectionLost += this.OnClientConnectionLost; this.SendMessages(); }
private S101Robot(S101Client client, EmberTypeBag types, XmlReader logReader, bool sendFirstMessage) { if (client == null) { throw new ArgumentNullException(nameof(client)); } this.client = client; this.logReader = new S101LogReader(types, logReader); this.sendFirstMessage = sendFirstMessage; this.client.OutOfFrameByteReceived += this.OnOutOfFrameByteReceived; this.client.EmberDataReceived += this.OnClientEmberDataReceived; this.client.ConnectionLost += this.OnClientConnectionLost; this.SendMessages(); }