Ejemplo n.º 1
0
        /// <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();
        }
Ejemplo n.º 2
0
        /// <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();
        }