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); }
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" } } }); }
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")); }
public MainViewModel() { this.UrlByteCount = new NotifyTaskCompletion <int>( MyStaticService.CountBytesInUrlAsync("http://www.example.com")); }