Firestore API - Class FirestoreDbBuilder (3.6.0)

public sealed class FirestoreDbBuilder : ClientBuilderBase<FirestoreDb>

Reference documentation and code samples for the Firestore API class FirestoreDbBuilder.

Builder class for FirestoreDb, providing simple configuration of credentials, endpoint, project ID etc.

Inheritance

object > ClientBuilderBaseFirestoreDb > FirestoreDbBuilder

Namespace

Google.Cloud.Firestore

Assembly

Google.Cloud.Firestore.dll

Constructors

FirestoreDbBuilder()

public FirestoreDbBuilder()

Creates a new builder with default settings.

Properties

BatchGetDocumentsRetrySettings

public RetrySettings BatchGetDocumentsRetrySettings { get; set; }

The settings to use for BatchGetDocuments RPCs (used by all methods that get document snapshots), or null for the default settings.

Property Value
Type Description
RetrySettings

ConverterRegistry

public ConverterRegistry ConverterRegistry { get; set; }

A registry for custom converters. May be null.

Property Value
Type Description
ConverterRegistry

DatabaseId

public string DatabaseId { get; set; }

The ID of the database within the project. May be null, in which case the default database will be used.

Property Value
Type Description
string

EmulatorDetection

public EmulatorDetection EmulatorDetection { get; set; }

Specifies how the builder responds to the presence of the FIRESTORE_EMULATOR_HOST emulator environment variable.

Property Value
Type Description
EmulatorDetection
Remarks

This property defaults to None, meaning that the environment variable is ignored.

ProjectId

public string ProjectId { get; set; }

The ID of the Google Cloud project that contains the database. May be null, in which case the project will be automatically detected if possible.

Property Value
Type Description
string

Settings

public FirestoreSettings Settings { get; set; }

The settings to use for RPCs, or null for the default settings.

Property Value
Type Description
Google.Cloud.Firestore.V1.FirestoreSettings

WarningLogger

public Action<string> WarningLogger { get; set; }

Action to receive warning messages. May be null, in which case warnings will be ignored.

Property Value
Type Description
Actionstring

Methods

Build()

public override FirestoreDb Build()

Builds the resulting client.

Returns
Type Description
FirestoreDb
Overrides

BuildAsync(CancellationToken)

public override Task<FirestoreDb> BuildAsync(CancellationToken cancellationToken = default)

Builds the resulting client asynchronously.

Parameter
Name Description
cancellationToken CancellationToken
Returns
Type Description
TaskFirestoreDb
Overrides

GetChannelPool()

protected override ChannelPool GetChannelPool()

Returns the channel pool to use when no other options are specified. This method is not called unless CanUseChannelPool returns true, so if a channel pool is unavailable, override that property to return false and throw an exception from this method.

Returns
Type Description
ChannelPool
Overrides