Update ObservableList.cs
This commit is contained in:
parent
20e4a09981
commit
f63fdfca2f
1 changed files with 2 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ public class ObservableList<T> : IList<T>
|
|||
{
|
||||
private List<T> _items = new();
|
||||
|
||||
public event EventHandler<ObservableListUpdate<T>>? ItemsChanged;
|
||||
public event EventHandler<ObservableListUpdate<T>> ItemsChanged = delegate { };
|
||||
|
||||
public T this[int index] { get => _items[index]; set { _items[index] = value; } }
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ public class ObservableList<T> : IList<T>
|
|||
|
||||
_ = Task.Run(() =>
|
||||
{
|
||||
this.ItemsChanged?.Invoke(null, new ObservableListUpdate<T>
|
||||
this.ItemsChanged.Invoke(null, new ObservableListUpdate<T>
|
||||
{
|
||||
List = this,
|
||||
NewItems = new List<T>() { item },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue