Example #1
0
        private void AddIfNew(bool ignoreMonoCheck, int resultDeviceDatabaseId, bool resultIsMonoTouch, List<DeviceInfo> deviceList)
        {
            for (int i=0; i<_deviceList.Count; i++)
            {
                DeviceForTable device = _deviceList[i];
                if (resultDeviceDatabaseId == device.DatabaseId)
                {
                    if (ignoreMonoCheck || resultIsMonoTouch == device.IsMono)
                    {
                        return;
                    }
                }
            }

            DeviceInfo di = deviceList.Find(dev => { return dev.DatabaseId == resultDeviceDatabaseId; });

            DeviceForTable newDevice = new DeviceForTable (resultDeviceDatabaseId,
                                                           ignoreMonoCheck || resultIsMonoTouch,
                                                           di.SpecificHWVersion);
            _deviceList.Add (newDevice);
        }