public BoardsUpdateRequest(IUpdatableBoard board) : base(board.Id, method: Method.PUT) { Guard.RequiredTrelloString(board.Name, "name"); Guard.OptionalTrelloString(board.Desc, "desc"); AddParameter("name", board.Name); AddParameter("desc", board.Desc); AddParameter("closed", board.Closed.ToTrelloString()); }
public BoardsUpdateRequest(IUpdatableBoard board) : base(board.Id, method: Method.PUT) { Guard.RequiredTrelloString(board.Name, "name"); Guard.OptionalTrelloString(board.Desc, "desc"); AddParameter("name", board.Name); AddParameter("desc", board.Desc); AddParameter("closed", board.Closed.ToTrelloString()); }
private async void LoadListsFor(IUpdatableBoard board, May <string> selectedId) { _progress.Show("Loading lists..."); try { var lists = (await _api.Lists.ForBoard(new BoardId(board.Id))).ToList(); Lists.Clear(); Lists.AddRange(lists); selectedId .Else(lists.Take(1).Select(l => l.Id).MayFirst()) .IfHasValueThenDo(id => { SelectedList = lists.FirstOrDefault(l => l.Id == id); }); } catch (Exception ex) { Analytics.LogException(ex); MessageBox.Show("The lists for that board were unable to be loaded. Please " + "ensure that you have an active internet connection."); } finally { _progress.Hide(); } }
private async void LoadListsFor(IUpdatableBoard board, May<string> selectedId) { _progress.Show("Loading lists..."); try { var lists = (await _api.Lists.ForBoard(new BoardId(board.Id))).ToList(); Lists.Clear(); Lists.AddRange(lists); selectedId .Else(lists.Take(1).Select(l => l.Id).MayFirst()) .IfHasValueThenDo(id => { SelectedList = lists.FirstOrDefault(l => l.Id == id); }); } catch (Exception ex) { Analytics.LogException(ex); MessageBox.Show("The lists for that board were unable to be loaded. Please " + "ensure that you have an active internet connection."); } finally { _progress.Hide(); } }
public Task Update(IUpdatableBoard board) { return _restClient.RequestAsync(new BoardsUpdateRequest(board)); }
public void Update(IUpdatableBoard board) { _restClient.Request(new BoardsUpdateRequest(board)); }
public void Update(IUpdatableBoard board) { _restClient.Request(new BoardsUpdateRequest(board)); }
public Task Update(IUpdatableBoard board) { return _restClient.RequestAsync(new BoardsUpdateRequest(board)); }