Table of Contents

Method ResolveAsync

Namespace
MongoDB.Driver.Core.Configuration
Assembly
MongoDB.Driver.Core.dll

ResolveAsync(CancellationToken)

Resolves a connection string. If the connection string indicates more information is available in the DNS system, it will acquire that information as well.

public Task<ConnectionString> ResolveAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

Task<ConnectionString>

A resolved ConnectionString.

ResolveAsync(bool, CancellationToken)

Resolves a connection string. If the connection string indicates more information is available in the DNS system, it will acquire that information as well.

public Task<ConnectionString> ResolveAsync(bool resolveHosts, CancellationToken cancellationToken = default)

Parameters

resolveHosts bool

Whether to resolve hosts.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<ConnectionString>

A resolved ConnectionString.