public static async Task AddSynchronized <T>(this ObservableCollection <T> collection, T item) { await ClientObject.ExecuteSynchronized(() => collection.Add(item)); }
public static async Task InsertSynchronized <T>(this ObservableCollection <T> collection, int index, T item) { await ClientObject.ExecuteSynchronized(() => collection.Insert(index, item)); }