Beispiel #1
0
        /// <summary>
        /// Initializes device with the <see cref="IDeviceServiceChannel"/> interface.
        /// </summary>
        /// <param name="serviceChannel">Service channel used to communicate with the DeviceHive service.</param>
        public virtual void Initialize(IDeviceServiceChannel serviceChannel)
        {
            if (serviceChannel == null)
            {
                throw new ArgumentNullException("serviceChannel");
            }

            ServiceChannel = serviceChannel;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes device with the <see cref="IDeviceServiceChannel"/> interface.
        /// Also sets device status to "Online".
        /// </summary>
        /// <param name="serviceChannel">Service channel used to communicate with the DeviceHive service.</param>
        public virtual void Initialize(IDeviceServiceChannel serviceChannel)
        {
            if (serviceChannel == null)
                throw new ArgumentNullException("serviceChannel");

            ServiceChannel = serviceChannel;
            Status = "Online";
        }