/// <summary> /// Create a new instance of a ParticleDevice from a ParticleDeviceResponse /// </summary> /// <param name="deviceState">ParticleDeviceResponse from Particle Cloud</param> /// <param name="particleCloud">Authorized ParticleCloud</param> public ParticleDevice(ParticleDeviceResponse deviceState, ParticleCloud particleCloud) { this.deviceState = deviceState; this.particleCloud = particleCloud; UpdateState(); }
/// <summary> /// Create a new instance of a ParticleDevice with only an ID /// </summary> /// <param name="id">Device ID</param> /// <param name="particleCloud">Authorized ParticleCloud</param> public ParticleDevice(string deviceId, ParticleCloud particleCloud) { this.deviceState = new ParticleDeviceResponse(); this.deviceState.Id = deviceId; this.particleCloud = particleCloud; UpdateState(); }