Example #1
0
    public MainViewModel()
    {
        UrlByteCount = new NotifyTaskCompletion <int>(MyStaticService.CountBytesInUrlAsync("https://docs.microsoft.com/"));
        UsingEntity  = new NotifyTaskCompletion <int>(MyStaticService.UsingEntity());

        ///commands
        MyAsyncCommand = new AsyncCommand <string>(Calculate, CanCalculate, null, true);
    }
Example #2
0
 private async void Button_ClickAsync(object sender, RoutedEventArgs e)
 {
     await MyStaticService.AddUsingEntity(new Blog { BlogId = 1, Name = "Nona", Posts = new List <Post> {
                                                         new Post {
                                                             Title = "pota", Content = "miky"
                                                         }
                                                     } });
 }
Example #3
0
    async Task Calculate(string parameter)
    {
        await MyStaticService.AddUsingEntity(new Blog { BlogId = 1, Name = "Nona", Posts = new List <Post> {
                                                            new Post {
                                                                Title = "pota", Content = "miky"
                                                            }
                                                        } });

        //return Task.Factory.StartNew(CalculateCore);
    }
 public NotifyTaskCompletionViewModel()
 {
     UrlByteCount = new NotifyTaskCompletion <int>(
         MyStaticService.CountBytesInUrlAsync("https://www.google.com"));
 }
Example #5
0
 public MainViewModel()
 {
     this.UrlByteCount = new NotifyTaskCompletion <int>(
         MyStaticService.CountBytesInUrlAsync("http://www.example.com"));
 }