Ejemplo n.º 1
0
 protected override Task OnInitialise()
 {
     return(BusyViewModel.ActiveAsync("... Loading Attributes ...")
            .Then(() => _service.GetAttributesAsync(), Scheduler.Task.TPL)
            .Do(response => Available.AddRangeAsync(response.Dimensions.Select(CreateDimension)), Scheduler.Dispatcher.TPL)
            .Do(response => Available.AddRangeAsync(response.Measures.Select(CreateMeasure)), Scheduler.Dispatcher.TPL)
            .LogException(Log)
            .CatchAndHandle(_ => StandardDialog.Error("Error", "Problem initialising attributes"), Scheduler.Task.TPL)
            .Finally(BusyViewModel.InActive, Scheduler.Task.TPL));
 }