Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit 41a0de6

Browse files
committed
build: cleanup warnings
Disable CA2205 warning about duplicating NetFx methods via P/Invoke.
1 parent 371e4a7 commit 41a0de6

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ public async Task<Token> GeneratePersonalAccessToken(TargetUri targetUri, Token
6262
return await Task.FromResult(new Token("personal-access-token", TokenType.Personal));
6363
}
6464

65+
/// <summary>
66+
/// Generates a personal access token for use with Visual Studio Team Services.
67+
/// <para/>
68+
/// Returns the acquired token if successful; otherwise <see langword="null"/>;
69+
/// </summary>
70+
/// <param name="targetUri">The uniform resource indicator of the resource access tokens are being requested for.</param>
71+
/// <param name="accessToken">Access token granted by the identity authority (Azure).</param>
72+
/// <param name="tokenScope">The requested access scopes to be granted to the token.</param>
73+
/// <param name="requireCompactToken">`<see langword="true"/>` if requesting a compact format token; otherwise `<see langword="false"/>`.</param>
74+
public Task<Token> GeneratePersonalAccessToken(TargetUri targetUri, Token accessToken, TokenScope tokenScope, bool requireCompactToken)
75+
=> GeneratePersonalAccessToken(targetUri, accessToken, tokenScope, requireCompactToken, null);
76+
6577
/// <summary>
6678
/// Acquires a <see cref="Token"/> from the authority via an interactive user logon prompt.
6779
/// <para/>
@@ -72,7 +84,7 @@ public async Task<Token> GeneratePersonalAccessToken(TargetUri targetUri, Token
7284
/// <param name="resource">Identifier of the target resource that is the recipient of the requested token.</param>
7385
/// <param name="redirectUri">Address to return to upon receiving a response from the authority.</param>
7486
/// <param name="queryParameters">optional value, appended as-is to the query string in the HTTP authentication request to the authority.</param>
75-
public async Task<Token> InteractiveAcquireToken(TargetUri targetUri, string clientId, string resource, Uri redirectUri, string queryParameters = null)
87+
public async Task<Token> InteractiveAcquireToken(TargetUri targetUri, string clientId, string resource, Uri redirectUri, string queryParameters)
7688
{
7789
Assert.Equal(ExpectedQueryParameters, queryParameters);
7890

analysisRules.ruleset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<Rule Id="CA2201" Action="None" />
3333
<Rule Id="CA2202" Action="None" />
3434
<Rule Id="CA2204" Action="None" />
35+
<Rule Id="CA2205" Action="None" />
3536
<Rule Id="CA2208" Action="None" />
3637
<Rule Id="CA2210" Action="None" />
3738
<Rule Id="CA2225" Action="None" />

0 commit comments

Comments
 (0)