Table of Contents

Method GetReadChannelSourceAsync

Namespace
MongoDB.Driver.Core.Bindings
Assembly
MongoDB.Driver.Core.dll

GetReadChannelSourceAsync(CancellationToken)

Gets a channel source for read operations.

Task<IChannelSourceHandle> GetReadChannelSourceAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IChannelSourceHandle>

A channel source.

GetReadChannelSourceAsync(IReadOnlyCollection<ServerDescription>, CancellationToken)

Gets a channel source for read operations while deprioritizing servers in the provided collection.

Task<IChannelSourceHandle> GetReadChannelSourceAsync(IReadOnlyCollection<ServerDescription> deprioritizedServers, CancellationToken cancellationToken)

Parameters

deprioritizedServers IReadOnlyCollection<ServerDescription>

The deprioritized servers.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IChannelSourceHandle>

A channel source.