Пример #1
0
        protected void FetchInitialUserData(Action successCallback, Action <ServiceException> failureCallback)
        {
            var call = App.BuildService(new FetchMeService());

            call.AddFailureHandler(failureCallback);
            call.Execute(service =>
            {
                CurrentUser = service.Result;
                Courses     = new CoursesViewModel();
                Courses.Load(successCallback);
            });
        }
Пример #2
0
 protected void FetchInitialUserData(Action successCallback,Action<ServiceException> failureCallback)
 {
     var call = App.BuildService(new FetchMeService());
     call.AddFailureHandler(failureCallback);
     call.Execute(service =>
     {
         CurrentUser = service.Result;
         Courses = new CoursesViewModel();
         Courses.Load(successCallback);
     });
 }
Пример #3
0
 protected override void OnReady(System.Windows.Navigation.NavigationEventArgs e)
 {
     var cvm = new CoursesViewModel();
     this.DataContext = cvm;
     cvm.Load();
 }