-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move TryGetAuthProvider to new IApplicationEnvironmentV2 interface (#365
) * Move TryGetAuthProvider to new IApplicationEnvironmentV2 interface * Document param * Add docstring * Fix tests
- Loading branch information
Showing
6 changed files
with
73 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/Microsoft.Performance.SDK/Processing/IApplicationEnvironmentV2.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using Microsoft.Performance.SDK.Auth; | ||
|
||
namespace Microsoft.Performance.SDK.Processing | ||
{ | ||
/// <summary> | ||
/// Extends <see cref="IApplicationEnvironment"/> to provide additional functionality. | ||
/// </summary> | ||
[Obsolete("This interface will be removed in version 2.0 of the SDK. It is OK to use this interface in version 1.x of the SDK.")] | ||
public interface IApplicationEnvironmentV2 | ||
: IApplicationEnvironment | ||
{ | ||
/// <summary> | ||
/// Attempts to get an <see cref="IAuthProvider{TAuth, TResult}"/> that can provide authentication | ||
/// for <see cref="IAuthMethod{TResult}"/> of type <typeparamref name="TAuth"/>. | ||
/// </summary> | ||
/// <param name="provider"> | ||
/// The found provider, or <c>null</c> if no registered provider can provide authentication for | ||
/// <typeparamref name="TAuth"/>. | ||
/// </param> | ||
/// <typeparam name="TAuth"> | ||
/// The type of the <see cref="IAuthMethod{TResult}"/> for which to attempt to get a provider. | ||
/// </typeparam> | ||
/// <typeparam name="TResult"> | ||
/// The type of the result of a successful authentication for <typeparamref name="TAuth"/>. | ||
/// </typeparam> | ||
/// <returns> | ||
/// <c>true</c> if a provider was found; <c>false</c> otherwise. If <c>false</c> is returned, | ||
/// <paramref name="provider"/> will be <c>null</c>. | ||
/// </returns> | ||
bool TryGetAuthProvider<TAuth, TResult>(out IAuthProvider<TAuth, TResult> provider) | ||
where TAuth : IAuthMethod<TResult>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters