mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-25 11:18:37 +08:00
this is for cases where you would like to have INotifyCollectionChanged and INotifyPropertyChanged implemented, but dont need the level of detail that those types provide.
27 lines
643 B
C#
27 lines
643 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace mRemoteNG.Tools.CustomCollections
|
|
{
|
|
public class CollectionUpdatedEventArgs<T> : EventArgs
|
|
{
|
|
public IEnumerable<T> ChangedItems { get; }
|
|
public ActionType Action { get; }
|
|
|
|
public CollectionUpdatedEventArgs(ActionType action, IEnumerable<T> changedItems)
|
|
{
|
|
if (changedItems == null)
|
|
throw new ArgumentNullException(nameof(changedItems));
|
|
|
|
Action = action;
|
|
ChangedItems = changedItems;
|
|
}
|
|
}
|
|
|
|
public enum ActionType
|
|
{
|
|
Added,
|
|
Removed,
|
|
Updated
|
|
}
|
|
} |