static public void RegisterDevice(string name)
        {
            var _device = _devices.Find(x => x.Device.Name == name);

            if (_device != null)
            {
                _device.AwaitingRegistration = false;
                _device.Device.Registered    = true;
                DatabaseWrapper.RegisterDevice(name);
                DatabaseWrapper.AuthorizeDevice(_device.Device);
            }
        }
        static public void AddDevice(Device DeviceToAdd)
        {
            var _bufDevInfo = new DeviceInfo();

            _bufDevInfo.Device = DeviceToAdd;
            _bufDevInfo.AwaitingRegistration = !DatabaseWrapper.IsRegistered(DeviceToAdd);
            if (!_bufDevInfo.AwaitingRegistration)
            {
                DatabaseWrapper.AuthorizeDevice(DeviceToAdd);
            }
            else
            {
                _bufDevInfo.Device.EnqueueRegister();
            }
            _devices.Add(_bufDevInfo);
        }