コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 private void DataGridEx_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     CollectionUpdated?.Invoke(sender, e);
 }
コード例 #4
0
 private void RaiseCollectionChangedEvent(ActionType action, IEnumerable <T> changedItems)
 {
     CollectionUpdated?.Invoke(this, new CollectionUpdatedEventArgs <T>(action, changedItems));
 }