public void FetchAndUpdateWatchlistChanges(String username, String token)
        {
            FetchBegunUpdateGui();

            ChangesFetcher fetcher = new ChangesFetcher();
            fetcher.BeginFetchWatchlistChanges(username, token,
                new ChangesFetcher.RecentChangesFetched(this.RecentChangesFetchedCallback));
        }
        public void FetchAndUpdateRecentChanges()
        {
            FetchBegunUpdateGui();

            ChangesFetcher fetcher = new ChangesFetcher();
            fetcher.BeginFetchRecentChanges(new ChangesFetcher.RecentChangesFetched(
                this.RecentChangesFetchedCallback));
        }
        private void RecentChangesFetchedCallback(ChangesFetcher.Result result)
        {
            if (result.WasSuccessful())
            {
                object[] chanesArray = { result.Changes };
                mainPage.Dispatcher.BeginInvoke(new UpdateRecentChangesDelegate(ChangesFetchedUpdateGui), chanesArray);

                if (this.ChangesFetched != null)
                    ChangesFetched(this, new ChangesFetchedEventArgs(result.Changes));
            }
            else
            {
                mainPage.Dispatcher.BeginInvoke(new Action(ErrorOccurredUpdateGui));
            }
        }
Exemplo n.º 4
0
 private void OnFetched(ChangesFetcher.Result result)
 {
     //pass changes to OnInvoke()
     changes = result.Changes;
     changesFetchedEvent.Set();
 }
Exemplo n.º 5
0
 public Result(ChangesFetcher fetcher, Exception occurredException, Object callerData)
 {
     this.fetcher = fetcher;
     this.changes = null;
     this.exception = occurredException;
     this.callerData = callerData;
 }
Exemplo n.º 6
0
 public Result(ChangesFetcher fetcher, List<RecentChange> changes, Object callerData)
 {
     this.fetcher = fetcher;
     this.changes = changes;
     this.exception = null;
     this.callerData = callerData;
 }