public void Dispose() { if (_device != null) { _device.Dispose(); _device = null; } }
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); }
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); }