Skip to main content

ConnectionResolver

  • Namespace: PPDS.Auth.Pooling
  • Assembly: PPDS.Auth
  • Kind: Class
  • Implements: IDisposable

Summary

Resolves profile names to authenticated connections.

Members

Constructors

ConnectionResolver(ProfileStore store, Action<DeviceCodeInfo> deviceCodeCallback, ISecureCredentialStore credentialStore)

ConnectionResolver(ProfileStore store, Action<DeviceCodeInfo> deviceCodeCallback, ISecureCredentialStore credentialStore)

Creates a new ConnectionResolver.

  • Param store: The profile store (optional, uses default if null).

  • Param deviceCodeCallback: Optional callback for device code display.

  • Param credentialStore: Optional secure credential store for looking up secrets.

Methods

Dispose

void Dispose()

(inherited from System.IDisposable.Dispose)

ParseProfileString

IReadOnlyList<string> ParseProfileString(string profileString)

Parses a comma-separated profile string into individual names.

  • Param profileString: Comma-separated profile names.

  • Returns: List of profile names.

ResolveActiveAsync

Task<ServiceClient> ResolveActiveAsync(string environmentOverride, CancellationToken cancellationToken)

Resolves the active profile to a ServiceClient.

  • Param environmentOverride: Optional environment URL override.

  • Param cancellationToken: Cancellation token.

  • Returns: An authenticated ServiceClient.

ResolveAsync

Task<ServiceClient> ResolveAsync(string profileName, string environmentOverride, CancellationToken cancellationToken)

Resolves a profile or uses the active profile if none specified.

  • Param profileName: Optional profile name (uses active if null).

  • Param environmentOverride: Optional environment URL override.

  • Param cancellationToken: Cancellation token.

  • Returns: An authenticated ServiceClient.

ResolveByNameAsync

Task<ServiceClient> ResolveByNameAsync(string profileName, string environmentOverride, CancellationToken cancellationToken)

Resolves a named profile to a ServiceClient.

  • Param profileName: The profile name.

  • Param environmentOverride: Optional environment URL override.

  • Param cancellationToken: Cancellation token.

  • Returns: An authenticated ServiceClient.

ResolveMultipleAsync

Task<IReadOnlyList<ProfileConnectionSource>> ResolveMultipleAsync(IEnumerable<string> profileNames, string environmentOverride, int maxPoolSizePerProfile, string environmentDisplayName, CancellationToken cancellationToken)

Resolves multiple profile names to connection sources for pooling.

  • Param profileNames: The profile names (comma-separated or array).

  • Param environmentOverride: Optional environment URL override.

  • Param maxPoolSizePerProfile: Maximum pool size per profile.

  • Param environmentDisplayName: Optional environment display name for connection naming.

  • Param cancellationToken: Cancellation token.

  • Returns: List of connection sources. Caller takes ownership and is responsible for disposal.