Skip to main content

IPooledClient

  • Namespace: PPDS.Dataverse.Pooling
  • Assembly: PPDS.Dataverse
  • Kind: Interface
  • Implements: IOrganizationServiceAsync, IOrganizationServiceAsync2, IOrganizationService, IDataverseClient, IAsyncDisposable, IDisposable

Summary​

A client obtained from the connection pool. Implements System.IAsyncDisposable and System.IDisposable to return the connection to the pool.

Members​

Methods​

MarkInvalid​

void MarkInvalid(string reason)

Marks this connection as invalid. It will be disposed on return instead of being pooled. Call this when an unrecoverable error occurs (auth failure, connection failure, etc.).

  • Param reason: The reason for invalidation (for logging/diagnostics).

Properties​

ConnectionId​

Guid ConnectionId { get; }

Gets the unique identifier for this connection instance.

ConnectionName​

string ConnectionName { get; }

Gets the name of the connection configuration this client came from. Used as a stable key for throttle tracking and rate control.

CreatedAt​

DateTime CreatedAt { get; }

Gets when this connection was created.

DisplayName​

string DisplayName { get; }

Gets a formatted display name for logging, combining identity and org name. Format: "{ConnectionName}@{ConnectedOrgFriendlyName}"

InvalidReason​

string InvalidReason { get; }

Gets the reason the connection was marked invalid, if any.

IsInvalid​

bool IsInvalid { get; }

Gets whether this connection has been marked as invalid. Invalid connections will be disposed instead of returned to the pool.

LastUsedAt​

DateTime LastUsedAt { get; }

Gets when this connection was last used.