コード例 #1
0
 /// <summary>
 /// Creates an identity client. This is needed for fetching a reviewer's vsts identity.
 /// </summary>
 /// <param name="vstsAccountUrl">vsts account's url</param>
 /// <param name="personalToken"> personal access token to access the vsts account. </param>
 /// <returns>an IdentityHttpClient to use for retrieving identities from vsts. </returns>
 public static IdentityHttpClient CreateIdentityClient(Uri vstsAccountUrl, string personalToken)
 {
     var vstsCredential = new VssBasicCredential(string.Empty, personalToken);
     IdentityHttpClient identityHttpClient = new IdentityHttpClient(vstsAccountUrl, vstsCredential);
     return identityHttpClient;
 }