public MainWindowViewModel()
        {
            Url                  = "http://www.bing.com/";
            Operations           = new ObservableCollection <CountUrlBytesViewModel>();
            CountUrlBytesCommand = new DelegateCommand(() =>
            {
                var countBytes = new AsyncCommand <int>(token =>
                                                        MyStaticService.DownloadAndCountBytesAsync(
                                                            Url, token));

                countBytes.Execute(null);
                Operations.Add(new CountUrlBytesViewModel(this, Url, countBytes));
            });
        }
Exemple #2
0
 public MainViewModel()
 {
     UrlByteCount = new NotifyTaskCompletion <int>(
         MyStaticService.CountBytesInUrlAsync("http://www.bing.com"));
 }