private void CleanUp()
{
var objects = new List<object>();
lock (_objectValidationLock)
{
objects.AddRange(_objectValidation.Keys);
}
foreach (object obj in objects)
{
if (obj is IEnumerable)
{
RemoveObjectsFromWatchList(obj as IEnumerable);
}
else if (obj is INotifyPropertyChanged)
{
RemoveObjectFromWatchList(obj);
}
}
_objectValidation.Clear();
#if NET || SL5
if (_infoBarMessageControl != null)
{
_infoBarMessageControl.UnsubscribeWarningAndErrorValidator(this);
_infoBarMessageControl = null;
}
#endif
}