ServiceClientSource
- Namespace:
PPDS.Dataverse.Pooling - Assembly:
PPDS.Dataverse - Kind: Class
- Implements:
IConnectionSource,IDisposable
Summary
Connection source for pre-authenticated ServiceClients. Use this when you have an already-authenticated client (device code, managed identity, etc.)
Members
Constructors
ServiceClientSource(ServiceClient client, string name, int maxPoolSize)
ServiceClientSource(ServiceClient client, string name, int maxPoolSize)
Creates a new connection source wrapping an existing ServiceClient.
-
Param
client: The authenticated ServiceClient to use as the seed for cloning. Must be ready (Microsoft.PowerPlatform.Dataverse.Client.ServiceClient.IsReady== true). -
Param
name: Unique name for this connection source. Used for logging and tracking. -
Param
maxPoolSize: Maximum number of pooled connections from this source. Default is 10.
Methods
Dispose
void Dispose()
Disposes the underlying ServiceClient.
GetSeedClient
ServiceClient GetSeedClient()
Gets the seed ServiceClient for cloning.
- Returns: An authenticated, ready-to-use ServiceClient. The pool will clone this client to create pool members.
InvalidateSeed
void InvalidateSeed()
Invalidates the cached seed client, forcing fresh authentication on next use.
Properties
MaxPoolSize
int MaxPoolSize { get; }
Gets the maximum number of pooled connections for this source.
Name
string Name { get; }
Gets the unique name for this connection source. Used for logging, throttle tracking, and connection selection.