public ChangeNotificationWrapper(object value)
{
Argument.IsNotNull("value", value);
_weakReference = new WeakReference(value);
// Note that we either support collections OR property changed, not both because ObservableCollection implements
// the PropertyChanged as protected.
var valueAsNotifyCollectionChanged = value as INotifyCollectionChanged;
if (valueAsNotifyCollectionChanged != null)
{
SupportsNotifyCollectionChanged = true;
}
var valueAsNotifyPropertyChanged = value as INotifyPropertyChanged;
if (valueAsNotifyPropertyChanged != null)
{
SupportsNotifyPropertyChanged = true;
}
SubscribeNotifyChangedEvents(value, null);
}
#endregion