Exemplo n.º 1
0
        private static void UpdateNotificationCount(NotifyCollectionChangedEventArgs e, NotifyActionCount notifyCount)
        {
            switch (e.Action)
            {
            case NotifyCollectionChangedAction.Add:
                ++notifyCount.AddCount;
                break;

            case NotifyCollectionChangedAction.Remove:
                ++notifyCount.RemoveCount;
                break;

            case NotifyCollectionChangedAction.Replace:
                ++notifyCount.ReplaceCount;
                break;

            case NotifyCollectionChangedAction.Move:
                ++notifyCount.MoveCount;
                break;

            case NotifyCollectionChangedAction.Reset:
                ++notifyCount.ResetCount;
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
 // Use simple string comparison instead of IEquatable<T>
 private void AreEqual(NotifyActionCount expected, NotifyActionCount actual)
 {
     Assert.AreEqual(expected.ToString(), actual.ToString());
 }