Table of Contents

Method SelectServerAsync

Namespace
MongoDB.Driver.Core.Clusters
Assembly
MongoDB.Driver.Core.dll

SelectServerAsync(IServerSelector, CancellationToken)

Selects a server from the cluster.

Task<IServer> SelectServerAsync(IServerSelector selector, CancellationToken cancellationToken)

Parameters

selector IServerSelector

The server selector.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IServer>

A Task representing the operation. The result of the Task is the selected server.