Table of Contents

Class MongoDefaults

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Default values for various Mongo settings.

public static class MongoDefaults
Inheritance
MongoDefaults
Inherited Members

Properties

AssignIdOnInsert

Gets or sets whether the driver should assign a value to empty Ids on Insert.

public static bool AssignIdOnInsert { get; set; }

Property Value

bool

AuthenticationMechanism

Gets or sets the default authentication mechanism.

public static string AuthenticationMechanism { get; set; }

Property Value

string

ComputedWaitQueueSize

Gets the actual wait queue size (either WaitQueueSize or WaitQueueMultiple x MaxConnectionPoolSize).

[Obsolete("This property will be removed in a later release.")]
public static int ComputedWaitQueueSize { get; }

Property Value

int

ConnectTimeout

Gets or sets the connect timeout.

public static TimeSpan ConnectTimeout { get; set; }

Property Value

TimeSpan

GuidRepresentation

Gets or sets the representation to use for Guids (this is an alias for BsonDefaults.GuidRepresentation).

[Obsolete("Configure serializers instead.")]
public static GuidRepresentation GuidRepresentation { get; set; }

Property Value

GuidRepresentation

LocalThreshold

Gets or sets the default local threshold.

public static TimeSpan LocalThreshold { get; set; }

Property Value

TimeSpan

MaxBatchCount

Gets or sets the maximum batch count.

public static int MaxBatchCount { get; set; }

Property Value

int

MaxConnectionIdleTime

Gets or sets the max connection idle time.

public static TimeSpan MaxConnectionIdleTime { get; set; }

Property Value

TimeSpan

MaxConnectionLifeTime

Gets or sets the max connection life time.

public static TimeSpan MaxConnectionLifeTime { get; set; }

Property Value

TimeSpan

MaxConnectionPoolSize

Gets or sets the max connection pool size.

public static int MaxConnectionPoolSize { get; set; }

Property Value

int

MaxDocumentSize

Gets or sets the max document size

public static int MaxDocumentSize { get; set; }

Property Value

int

MaxMessageLength

Gets or sets the max message length.

public static int MaxMessageLength { get; set; }

Property Value

int

MinConnectionPoolSize

Gets or sets the min connection pool size.

public static int MinConnectionPoolSize { get; set; }

Property Value

int

OperationTimeout

Gets or sets the operation timeout.

public static TimeSpan OperationTimeout { get; set; }

Property Value

TimeSpan

ReadEncoding

Gets or sets the Read Encoding.

public static UTF8Encoding ReadEncoding { get; set; }

Property Value

UTF8Encoding

ServerSelectionTimeout

Gets or sets the server selection timeout.

public static TimeSpan ServerSelectionTimeout { get; set; }

Property Value

TimeSpan

SocketTimeout

Gets or sets the socket timeout.

public static TimeSpan SocketTimeout { get; set; }

Property Value

TimeSpan

TcpReceiveBufferSize

Gets or sets the TCP receive buffer size.

public static int TcpReceiveBufferSize { get; set; }

Property Value

int

TcpSendBufferSize

Gets or sets the TCP send buffer size.

public static int TcpSendBufferSize { get; set; }

Property Value

int

WaitQueueMultiple

Gets or sets the wait queue multiple (the actual wait queue size will be WaitQueueMultiple x MaxConnectionPoolSize, see also WaitQueueSize).

[Obsolete("This property will be removed in a later release.")]
public static double WaitQueueMultiple { get; set; }

Property Value

double

WaitQueueSize

Gets or sets the wait queue size (see also WaitQueueMultiple).

[Obsolete("This property will be removed in a later release.")]
public static int WaitQueueSize { get; set; }

Property Value

int

WaitQueueTimeout

Gets or sets the wait queue timeout.

public static TimeSpan WaitQueueTimeout { get; set; }

Property Value

TimeSpan

WriteEncoding

Gets or sets the Write Encoding.

public static UTF8Encoding WriteEncoding { get; set; }

Property Value

UTF8Encoding