Table of Contents

Class PoolingOrgServiceProvider

Namespace
Hsl.Xrm.Sdk.Client
Assembly
Hsl.Xrm.Sdk.Client.dll

Class for pooling org service instances. Methods on this class are thread safe.

public sealed class PoolingOrgServiceProvider : IOrgServiceProvider, IDisposable
Inheritance
PoolingOrgServiceProvider
Implements
Inherited Members

Constructors

PoolingOrgServiceProvider(string)

Creates a provider for the given connection string.

public PoolingOrgServiceProvider(string connectionString)

Parameters

connectionString string

PoolingOrgServiceProvider(string, bool)

Creates a provider for the given connection string.

public PoolingOrgServiceProvider(string connectionString, bool enableEarlyBoundTypes)

Parameters

connectionString string
enableEarlyBoundTypes bool

Whether to enable early bound types from CrmSvcUtil.

Methods

Acquire()

Gets or creates a connection. Call IProvidedOrgService.Dispose to return it to the pool.

public IProvidedOrgService Acquire()

Returns

IProvidedOrgService

Acquire(Guid)

Gets or creates a connection. Call IProvidedOrgService.Dispose to return it to the pool.

public IProvidedOrgService Acquire(Guid userId)

Parameters

userId Guid

Sets the CallerId for all requests to the given user.

Returns

IProvidedOrgService

Dispose()

Disposes the PoolingOrgServiceProvider closing the underlying connections.

public void Dispose()

ValidateAllAsync()

Verifies that each appid in the connection string is able to login and connect to Dynamics.

public Task ValidateAllAsync()

Returns

Task

Warmup()

Calling this will make the initial uses of the service execute faster.

public Task Warmup()

Returns

Task