C# Class MongoDB.Driver.MongoServerSettings

The settings used to access a MongoDB server.
显示文件 Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Private Properties

Property Type Description
MongoServerSettings System

Public Methods

Method Description
Clone ( ) : MongoServerSettings

Creates a clone of the settings.

Equals ( object obj ) : bool

Compares two MongoServerSettings instances.

Freeze ( ) : MongoServerSettings

Freezes the settings.

FromClientSettings ( MongoClientSettings clientSettings ) : MongoServerSettings

Creates a new MongoServerSettings object from a MongoClientSettings object.

FromConnectionStringBuilder ( MongoConnectionStringBuilder builder ) : MongoServerSettings

Gets a MongoServerSettings object intialized with values from a MongoConnectionStringBuilder.

FromUrl ( MongoDB.Driver.MongoUrl url ) : MongoServerSettings

Gets a MongoServerSettings object intialized with values from a MongoUrl.

FrozenCopy ( ) : MongoServerSettings

Returns a frozen copy of the settings.

GetCredentials ( string databaseName ) : MongoDB.Driver.MongoCredentials

Gets credentials for a particular database.

GetHashCode ( ) : int

Gets the hash code.

MongoServerSettings ( ) : System

Creates a new instance of MongoServerSettings. Usually you would use a connection string instead.

ToString ( ) : string

Returns a string representation of the settings.

Private Methods

Method Description
MongoServerSettings ( ConnectionMode connectionMode, System.TimeSpan connectTimeout, MongoCredentialsStore credentialsStore, MongoDB.Driver.MongoCredentials defaultCredentials, GuidRepresentation guidRepresentation, bool ipv6, System.TimeSpan maxConnectionIdleTime, System.TimeSpan maxConnectionLifeTime, int maxConnectionPoolSize, int minConnectionPoolSize, ReadPreference readPreference, string replicaSetName, MongoDB.Driver.SafeMode safeMode, System.TimeSpan secondaryAcceptableLatency, IEnumerable servers, System.TimeSpan socketTimeout, bool useSsl, bool verifySslCertificate, int waitQueueSize, System.TimeSpan waitQueueTimeout ) : System

Method Details

Clone() public method

Creates a clone of the settings.
public Clone ( ) : MongoServerSettings
return MongoServerSettings

Equals() public method

Compares two MongoServerSettings instances.
public Equals ( object obj ) : bool
obj object The other instance.
return bool

Freeze() public method

Freezes the settings.
public Freeze ( ) : MongoServerSettings
return MongoServerSettings

FromClientSettings() public static method

Creates a new MongoServerSettings object from a MongoClientSettings object.
public static FromClientSettings ( MongoClientSettings clientSettings ) : MongoServerSettings
clientSettings MongoClientSettings The MongoClientSettings.
return MongoServerSettings

FromConnectionStringBuilder() public static method

Gets a MongoServerSettings object intialized with values from a MongoConnectionStringBuilder.
public static FromConnectionStringBuilder ( MongoConnectionStringBuilder builder ) : MongoServerSettings
builder MongoConnectionStringBuilder The MongoConnectionStringBuilder.
return MongoServerSettings

FromUrl() public static method

Gets a MongoServerSettings object intialized with values from a MongoUrl.
public static FromUrl ( MongoDB.Driver.MongoUrl url ) : MongoServerSettings
url MongoDB.Driver.MongoUrl The MongoUrl.
return MongoServerSettings

FrozenCopy() public method

Returns a frozen copy of the settings.
public FrozenCopy ( ) : MongoServerSettings
return MongoServerSettings

GetCredentials() public method

Gets credentials for a particular database.
public GetCredentials ( string databaseName ) : MongoDB.Driver.MongoCredentials
databaseName string The database name.
return MongoDB.Driver.MongoCredentials

GetHashCode() public method

Gets the hash code.
public GetHashCode ( ) : int
return int

MongoServerSettings() public method

Creates a new instance of MongoServerSettings. Usually you would use a connection string instead.
public MongoServerSettings ( ) : System
return System

ToString() public method

Returns a string representation of the settings.
public ToString ( ) : string
return string