public DeviceClient(ClientConf clientConf, AbstractDevice device) { this.CheckClientConf(clientConf); this.clientConf = clientConf; this.deviceId = clientConf.DeviceId; this.connection = new MqttConnection(clientConf, this, this); this.device = device; this.rawMessageListenerDic = new Dictionary <string, RawMessageListener>(); }
private void CheckClientConf(ClientConf clientConf) { if (clientConf == null) { throw new Exception("clientConf is null"); } if (clientConf.DeviceId == null) { throw new Exception("clientConf.deviceId is null"); } if (clientConf.ServerUri == null) { throw new Exception("clientConf.getSecret() is null"); } }