/// <summary> /// Logs the user in. /// </summary> /// <returns>A <see cref="Task"/> representing the asynchronous login operation.</returns> public Task <bool> Login() { using (IsBusySwitcher switcher = this.StartBusySection()) { throw new NotImplementedException(); } }
/// <summary> /// Saves the current configuration to the disk. /// </summary> public void Save() { using (IsBusySwitcher switcher = this.StartBusySection()) { Contract.Assume(this.config.CurrentConfiguration != null); this.config.CurrentConfiguration.Save(); } }
/// <summary> /// Loads more data (e.g. if the user is scrolling down) into the model. /// </summary> /// <param name="count">The amount of additional items to load.</param> /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns> public override async Task LoadMore(int count) { using (IsBusySwitcher section = this.StartBusySection()) { foreach (Category cat in await this.Client.GetCategoriesAsync(new CategoryCollectionParameters() { Start = this.Items.Count, Count = 100 })) { this.Items.Add(cat); } } }
/// <summary> /// Loads more data (e.g. if the user is scrolling down) into the model. /// </summary> /// <param name="count">The amount of additional items to load.</param> /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns> public override async Task LoadMore(int count) { using (IsBusySwitcher section = this.StartBusySection()) { foreach (Tag tag in await this.Client.GetTagsAsync(new TagCollectionParameters() { Start = this.Items.Count, Count = 100 })) { this.Items.Add(tag); } } }
/// <summary> /// Loads more data (e.g. if the user is scrolling down) into the model. /// </summary> /// <param name="count">The amount of additional items to load.</param> /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns> public override async Task LoadMore(int count) { using (IsBusySwitcher section = this.StartBusySection()) { foreach (Document doc in await this.Client.GetDocumentsAsync(new DocumentCollectionParameters() { Start = this.Items.Count, Count = 100 })) { this.Items.Add(doc); } } }
/// <summary> /// Loads the data into the model. /// </summary> /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns> public override async Task LoadData() { using (IsBusySwitcher section = this.StartBusySection()) { this.Items = new ObservableCollection <Tag>( await this.Client.GetTagsAsync( new TagCollectionParameters() { Count = 100 } ) ); } }
/// <summary> /// Loads the data into the model. /// </summary> /// <returns>A <see cref="Task"/> representing the asynchronous loading operation.</returns> public override async Task LoadData() { try { using (IsBusySwitcher section = this.StartBusySection()) { this.Items = new ObservableCollection <Category>( await this.Client.GetCategoriesAsync( new CategoryCollectionParameters() { Count = 100 } ) ); } } catch (Exception) { throw; } }