madb
madb copied to clipboard
Device.RefreshProperties fails with ArgumentException
Original Bug Filed on CodePlex
If you call Device.RefreshProperties, the code fails with an ArgumentException.
The GetPropReceiver attempts to add the properties to the Device.Properties dictionary. But if a property was already present previously, this will result the .Add operation to fail with an ArgumentException.
The best solution probably is to clear the dictionary before refreshing it. That way, stale properties are removed and the GetPropReciever will never encounter this situation.