Table of Contents

Class PinpointClientFactoryExtensions

Namespace
Acuit.Pinpoint.Services.Client
Assembly
Acuit.Pinpoint.Services.Client.dll

Extension methods for IPinpointClientFactory.

public static class PinpointClientFactoryExtensions
Inheritance
PinpointClientFactoryExtensions
Inherited Members

Methods

UsePinpointFileServiceClient(IPinpointClientFactory, Action<IPinpointFileServiceClient>)

Performs work with a client for the Acuit Pinpoint file retrieval service, properly closing the client and handling errors properly.

public static void UsePinpointFileServiceClient(this IPinpointClientFactory pinpointClientFactory, Action<IPinpointFileServiceClient> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Action<IPinpointFileServiceClient>

The delegate that performs the work, which will be provided the Acuit Pinpoint service client as its only parameter.

Remarks

This uses Use<TClient>(Func<TClient>, Action<TClient>) internally. See the remarks for that method for more information.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.

UsePinpointFileServiceClientAsync(IPinpointClientFactory, Func<IPinpointFileServiceClient, Task>)

Performs work with a client for the Acuit Pinpoint file retrieval service, properly closing the client and handling errors properly.

public static Task UsePinpointFileServiceClientAsync(this IPinpointClientFactory pinpointClientFactory, Func<IPinpointFileServiceClient, Task> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Func<IPinpointFileServiceClient, Task>

The delegate that performs the asynchronous work, which will be provided the Acuit Pinpoint service client as its only parameter and should return a task object representing the asynchronous operation.

Returns

Task

The task object representing the asynchronous operation.

Remarks

This uses UseAsync<TClient>(Func<TClient>, Func<TClient, Task>) internally. See the remarks for that method for more information.

Note: When targeting .NET 8 or later, using this method is unnecessary, as the client's IAsyncDisposable.DisposeAsync implementation provides the equivalent functionality in a more natural way using await using.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.

UsePinpointFileServiceClientAsync<TResult>(IPinpointClientFactory, Func<IPinpointFileServiceClient, Task<TResult>>)

Performs work with a client for the Acuit Pinpoint file retrieval service, properly closing the client and handling errors properly.

public static Task<TResult> UsePinpointFileServiceClientAsync<TResult>(this IPinpointClientFactory pinpointClientFactory, Func<IPinpointFileServiceClient, Task<TResult>> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Func<IPinpointFileServiceClient, Task<TResult>>

The delegate that performs the asynchronous work, which will be provided the Acuit Pinpoint service client as its only parameter and should return a task object representing the asynchronous operation, producing as its result a value of type TResult.

Returns

Task<TResult>

The task object representing the asynchronous operation.

Type Parameters

TResult

The return value type.

Remarks

Once the operation completes, the Result property on the returned task object contains the value produced by worker.

This uses UseAsync<TClient, TResult>(Func<TClient>, Func<TClient, Task<TResult>>) internally. See the remarks for that method for more information.

Note: When targeting .NET 8 or later, using this method is unnecessary, as the client's IAsyncDisposable.DisposeAsync implementation provides the equivalent functionality in a more natural way using await using.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.

UsePinpointFileServiceClient<TResult>(IPinpointClientFactory, Func<IPinpointFileServiceClient, TResult>)

Performs work with a client for the Acuit Pinpoint file retrieval service, properly closing the client and handling errors properly.

public static TResult UsePinpointFileServiceClient<TResult>(this IPinpointClientFactory pinpointClientFactory, Func<IPinpointFileServiceClient, TResult> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Func<IPinpointFileServiceClient, TResult>

The delegate that performs the work, which will be provided the Acuit Pinpoint service client as its only parameter and should return a value of type TResult.

Returns

TResult

The return value from worker.

Type Parameters

TResult

The return value type.

Remarks

This uses Use<TClient, TResult>(Func<TClient>, Func<TClient, TResult>) internally. See the remarks for that method for more information.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.

UsePinpointServiceClient(IPinpointClientFactory, Action<IPinpointServiceClient>)

Performs work with a client for the Acuit Pinpoint core service, properly closing the client and handling errors properly.

public static void UsePinpointServiceClient(this IPinpointClientFactory pinpointClientFactory, Action<IPinpointServiceClient> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Action<IPinpointServiceClient>

The delegate that performs the work, which will be provided the Acuit Pinpoint service client as its only parameter.

Remarks

This uses Use<TClient>(Func<TClient>, Action<TClient>) internally. See the remarks for that method for more information.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.

UsePinpointServiceClientAsync(IPinpointClientFactory, Func<IPinpointServiceClient, Task>)

Performs work with a client for the Acuit Pinpoint core service, properly closing the client and handling errors properly.

public static Task UsePinpointServiceClientAsync(this IPinpointClientFactory pinpointClientFactory, Func<IPinpointServiceClient, Task> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Func<IPinpointServiceClient, Task>

The delegate that performs the asynchronous work, which will be provided the Acuit Pinpoint service client as its only parameter and should return a task object representing the asynchronous operation.

Returns

Task

The task object representing the asynchronous operation.

Remarks

This uses UseAsync<TClient>(Func<TClient>, Func<TClient, Task>) internally. See the remarks for that method for more information.

Note: When targeting .NET 8 or later, using this method is unnecessary, as the client's IAsyncDisposable.DisposeAsync implementation provides the equivalent functionality in a more natural way using await using.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.

UsePinpointServiceClientAsync<TResult>(IPinpointClientFactory, Func<IPinpointServiceClient, Task<TResult>>)

Performs work with a client for the Acuit Pinpoint core service, properly closing the client and handling errors properly.

public static Task<TResult> UsePinpointServiceClientAsync<TResult>(this IPinpointClientFactory pinpointClientFactory, Func<IPinpointServiceClient, Task<TResult>> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Func<IPinpointServiceClient, Task<TResult>>

The delegate that performs the asynchronous work, which will be provided the Acuit Pinpoint service client as its only parameter and should return a task object representing the asynchronous operation, producing as its result a value of type TResult.

Returns

Task<TResult>

The task object representing the asynchronous operation.

Type Parameters

TResult

The return value type.

Remarks

Once the operation completes, the Result property on the returned task object contains the value produced by worker.

This uses UseAsync<TClient, TResult>(Func<TClient>, Func<TClient, Task<TResult>>) internally. See the remarks for that method for more information.

Note: When targeting .NET 8 or later, using this method is unnecessary, as the client's IAsyncDisposable.DisposeAsync implementation provides the equivalent functionality in a more natural way using await using.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.

UsePinpointServiceClient<TResult>(IPinpointClientFactory, Func<IPinpointServiceClient, TResult>)

Performs work with a client for the Acuit Pinpoint core service, properly closing the client and handling errors properly.

public static TResult UsePinpointServiceClient<TResult>(this IPinpointClientFactory pinpointClientFactory, Func<IPinpointServiceClient, TResult> worker)

Parameters

pinpointClientFactory IPinpointClientFactory

The IPinpointClientFactory.

worker Func<IPinpointServiceClient, TResult>

The delegate that performs the work, which will be provided the Acuit Pinpoint service client as its only parameter and should return a value of type TResult.

Returns

TResult

The return value from worker.

Type Parameters

TResult

The return value type.

Remarks

This uses Use<TClient, TResult>(Func<TClient>, Func<TClient, TResult>) internally. See the remarks for that method for more information.

Exceptions

ArgumentNullException

pinpointClientFactory is null.

ArgumentNullException

worker is null.

CommunicationException

A communication error occurred. This includes faults.

TimeoutException

A communication timeout error occurred.