Class FirestoreDbBuilder
Builder class for FirestoreDb, providing simple configuration of credentials, endpoint, project ID etc.
Inherited Members
Namespace: Google.Cloud.Firestore
Assembly: Google.Cloud.Firestore.dll
Syntax
public sealed class FirestoreDbBuilder : ClientBuilderBase<FirestoreDb>
Constructors
FirestoreDbBuilder()
Creates a new builder with default settings.
Declaration
public FirestoreDbBuilder()
Properties
BatchGetDocumentsRetrySettings
The settings to use for BatchGetDocuments RPCs (used by all methods that get document snapshots), or null for the default settings.
Declaration
public RetrySettings BatchGetDocumentsRetrySettings { get; set; }
Property Value
Type | Description |
---|---|
RetrySettings |
ConverterRegistry
A registry for custom converters. May be null.
Declaration
public ConverterRegistry ConverterRegistry { get; set; }
Property Value
Type | Description |
---|---|
ConverterRegistry |
DatabaseId
The ID of the database within the project. May be null, in which case the default database will be used.
Declaration
public string DatabaseId { get; set; }
Property Value
Type | Description |
---|---|
string |
EmulatorDetection
Specifies how the builder responds to the presence of the FIRESTORE_EMULATOR_HOST emulator environment variable.
Declaration
public EmulatorDetection EmulatorDetection { get; set; }
Property Value
Type | Description |
---|---|
EmulatorDetection |
Remarks
This property defaults to None, meaning that the environment variable is ignored.
ProjectId
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.
Declaration
public string ProjectId { get; set; }
Property Value
Type | Description |
---|---|
string |
Settings
The settings to use for RPCs, or null for the default settings.
Declaration
public FirestoreSettings Settings { get; set; }
Property Value
Type | Description |
---|---|
FirestoreSettings |
WarningLogger
Action to receive warning messages. May be null, in which case warnings will be ignored.
Declaration
public Action<string> WarningLogger { get; set; }
Property Value
Type | Description |
---|---|
Action<string> |
Methods
Build()
Builds the resulting client.
Declaration
public override FirestoreDb Build()
Returns
Type | Description |
---|---|
FirestoreDb |
Overrides
BuildAsync(CancellationToken)
Builds the resulting client asynchronously.
Declaration
public override Task<FirestoreDb> BuildAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<FirestoreDb> |
Overrides
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.
Declaration
protected override ChannelPool GetChannelPool()
Returns
Type | Description |
---|---|
ChannelPool |