private GetCheckBoxOptions ( string checkboxId ) : string>.Dictionary |
||
checkboxId | string | Id of the checkboxes |
return | string>.Dictionary |
/// <summary> /// Gets the list of all the users available as watchers for the project /// </summary> /// <param name="projectId">ID of the project</param> /// <returns>List of all the users available as watchers for the project</returns> public List <User> GetWatchers(int projectId) { XhtmlPage page = new XhtmlPage(this.httpHelper.GetWebRequest(this.ConstructUri(String.Format(NewIssueRelativeUri, projectId)))); List <User> watchers = new List <User>(); foreach (KeyValuePair <int, string> kv in page.GetCheckBoxOptions("issue[watcher_user_ids][]")) { watchers.Add(new User() { Id = kv.Key, Name = kv.Value }); } return(watchers); }
/// <summary> /// Gets the list of all the users available as watchers for the project /// </summary> /// <param name="projectId">ID of the project</param> /// <returns>List of all the users available as watchers for the project</returns> public List<User> GetWatchers(int projectId) { XhtmlPage page = new XhtmlPage(this.httpHelper.GetWebRequest(this.ConstructUri(String.Format(NewIssueRelativeUri, projectId)))); List<User> watchers = new List<User>(); foreach (KeyValuePair<int, string> kv in page.GetCheckBoxOptions("issue[watcher_user_ids][]")) { watchers.Add(new User() { Id = kv.Key, Name = kv.Value }); } return watchers; }