/// <summary> /// Gets all team members for the given <paramref name="projectId" /> and <paramref name="teamId"/>. /// </summary> /// <param name="client">The <see cref="TeamHttpClient" /> to use.</param> /// <param name="connection">The connection for the <paramref name="client"/> that will be used to retrieve the identities for the team members.</param> /// <param name="projectId">The project identifier.</param> /// <param name="teamId">The team identifier whose members to retrieve.</param> /// <param name="pageSize">Page size to use while retrieving the projects.</param> /// <param name="userState">The user state object.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException"> /// </exception> /// <exception cref="System.ArgumentException">$The '{nameof(connection)}' parameter must be for the given '{nameof(client)}'</exception> public static Task <IReadOnlyCollection <Identity> > GetAllTeamMembers(this TeamHttpClient client, VssConnection connection, Guid projectId, Guid teamId, int pageSize = 10, object userState = null, CancellationToken cancellationToken = default(CancellationToken)) { if (client == null) { throw new ArgumentNullException(nameof(client)); } if (connection == null) { throw new ArgumentNullException(nameof(connection)); } if (Equals(Guid.Empty, projectId)) { throw new ArgumentOutOfRangeException(nameof(projectId)); } if (Equals(Guid.Empty, teamId)) { throw new ArgumentOutOfRangeException(nameof(teamId)); } return(client.GetAllTeamMembers(connection, projectId.ToString(), teamId.ToString(), pageSize, userState, cancellationToken)); }
/// <summary> /// Gets all team members for the given <paramref name="project" /> and <paramref name="team" />. /// </summary> /// <param name="client">The <see cref="TeamHttpClient" /> to use.</param> /// <param name="connection">The connection for the <paramref name="client" /> that will be used to retrieve the identities for the team members.</param> /// <param name="project">The project.</param> /// <param name="team">The team.</param> /// <param name="pageSize">Page size to use while retrieving the projects.</param> /// <param name="userState">The user state object.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException"> /// </exception> public static Task <IReadOnlyCollection <Identity> > GetAllTeamMembers(this TeamHttpClient client, VssConnection connection, TeamProject project, WebApiTeam team, int pageSize = 10, object userState = null, CancellationToken cancellationToken = default(CancellationToken)) { if (client == null) { throw new ArgumentNullException(nameof(client)); } if (connection == null) { throw new ArgumentNullException(nameof(connection)); } if (project == null) { throw new ArgumentNullException(nameof(project)); } if (team == null) { throw new ArgumentNullException(nameof(team)); } return(client.GetAllTeamMembers(connection, project.Id, team.Id, pageSize, userState, cancellationToken)); }