public async Task Handle(CollectionUpdated notification) { using (var session = await _api.StartSession().ConfigureAwait(false)) { await FetchCollectionAndConvert(notification.CollectionId).ConfigureAwait(false); await session.Close().ConfigureAwait(false); } }
public static async Task <bool> UpdateCollection(Collection collection) { try { if (!await UpdateToken()) { Log.Error("Could not update token data"); return(false); } var response = await Client.Value.UploadCollection(collection, collection.AccountHi, collection.AccountLo); Log.Debug(response); CollectionUpdated?.Invoke(); return(true); } catch (Exception e) { Log.Error(e); return(false); } }
private void DataGridEx_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { CollectionUpdated?.Invoke(sender, e); }
private void RaiseCollectionChangedEvent(ActionType action, IEnumerable <T> changedItems) { CollectionUpdated?.Invoke(this, new CollectionUpdatedEventArgs <T>(action, changedItems)); }