Esempio n. 1
0
 public void Dispose()
 {
     if (_device != null)
     {
         _device.Dispose();
         _device = null;
     }
 }
Esempio n. 2
0
        private static Controller FromDevice(input.Device device)
        {
            Controller controller = new Controller();

            controller.Instance     = device.Instance;
            controller.Product      = device.Product;
            controller.InstanceName = device.InstanceName;
            controller.ProductName  = device.ProductName;

            return(controller);
        }
Esempio n. 3
0
        public Substate Update(DateTime timestamp, input.Device device)
        {
            _instance     = device.Instance;
            _product      = device.Product;
            _instanceName = device.InstanceName;
            _productName  = device.ProductName;
            _current      = true;

            if (_device != null)
            {
                _device.Dispose();
                _device = null;
            }
            _device = device;

            _timeStamp = timestamp;

            return(Substate.Controller);
        }