Example #1
0
        private void DisplayGroupsAsyncBegin()
        {
            //Show loading information.
            lbLoadingGroups.Visible = true;
            lbLoadingGroups.BringToFront();

            var taskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
            var task          = Task <IList <UserGroup> > .Factory.StartNew(() => DokuFlexService.GetUserGroups(_ticket));

            task.ContinueWith(t => DisplayGroupsAsyncEnd(t.Result), taskScheduler);
            task.ContinueWith(t => TaskAsyncExceptionHandle(t.Exception),
                              new CancellationTokenSource().Token, TaskContinuationOptions.OnlyOnFaulted,
                              taskScheduler);
        }
Example #2
0
 public IList <UserGroup> GetUserGroups(string ticket)
 {
     return(DokuFlexService.GetUserGroups(ticket));
 }