OpenHome.Net.Runner.DeviceRemoved C# (CSharp) Method

DeviceRemoved() private method

private DeviceRemoved ( ControlPoint aList, ControlPoint aDevice ) : void
aList ControlPoint
aDevice ControlPoint
return void
        private void DeviceRemoved(ControlPoint.CpDeviceList aList, ControlPoint.ICpDevice aDevice)
        {
            lock (this)
            {
                if (!iListFrozen)
                {
                    PrintDeviceInfo("Removed", aDevice);
                    string udn = aDevice.Udn();
                    int count = iDeviceList.Count;
                    for (int i = 0; i < count; i++)
                    {
                        if (iDeviceList[i].Udn() == udn)
                        {
                            iDeviceList[i].RemoveRef();
                            iDeviceList.RemoveAt(i);
                            break;
                        }
                    }
                }
            }
        }