public async Task NewFolderAsync() { if (await TableCategoryUtility.NewFolderAsync(this.authentication, this.descriptor) is string categoryName) { var viewModel = this.Items.First(item => item.DisplayName == categoryName); this.IsExpanded = true; viewModel.IsSelected = true; } }
public async Task NewTableAsync() { if (await TableCategoryUtility.NewTableAsync(this.authentication, this.descriptor) is string tableName) { if (this.Owner is ISelector owner) { var viewModel = this.Items.FirstOrDefault(item => item.DisplayName == tableName); owner.SelectedItem = viewModel; } } }
public async Task MoveAsync() { if (await TableCategoryUtility.MoveAsync(this.authentication, this.descriptor) == false) { return; } if (this.Owner is ISelector) { this.ExpandAncestors(); } }
public async Task RenameAsync() { if (await TableCategoryUtility.RenameAsync(this.authentication, this.descriptor) == false) { return; } if (this.Owner is ISelector owner) { owner.SelectedItem = this; } }
public async Task DeleteAsync() { await TableCategoryUtility.DeleteAsync(this.authentication, this.descriptor); }