示例#1
0
        // public methods
        /// <summary>
        /// Creates a clone of the settings.
        /// </summary>
        /// <returns>A clone of the settings.</returns>
        public MongoClientSettings Clone()
        {
            var clone = new MongoClientSettings();

            clone._connectionMode     = _connectionMode;
            clone._connectTimeout     = _connectTimeout;
            clone._credentials        = _credentials;
            clone._guidRepresentation = _guidRepresentation;
            clone._ipv6 = _ipv6;
            clone._maxConnectionIdleTime      = _maxConnectionIdleTime;
            clone._maxConnectionLifeTime      = _maxConnectionLifeTime;
            clone._maxConnectionPoolSize      = _maxConnectionPoolSize;
            clone._minConnectionPoolSize      = _minConnectionPoolSize;
            clone._operationTimeout           = _operationTimeout;
            clone._readEncoding               = _readEncoding;
            clone._readPreference             = _readPreference;
            clone._replicaSetName             = _replicaSetName;
            clone._secondaryAcceptableLatency = _secondaryAcceptableLatency;
            clone._servers              = new List <MongoServerAddress>(_servers);
            clone._socketTimeout        = _socketTimeout;
            clone._sslSettings          = (_sslSettings == null) ? null : _sslSettings.Clone();
            clone._useSsl               = _useSsl;
            clone._verifySslCertificate = _verifySslCertificate;
            clone._waitQueueSize        = _waitQueueSize;
            clone._waitQueueTimeout     = _waitQueueTimeout;
            clone._writeConcern         = _writeConcern;
            clone._writeEncoding        = _writeEncoding;
            return(clone);
        }
示例#2
0
        // public methods
        /// <summary>
        /// Creates a clone of the settings.
        /// </summary>
        /// <returns>A clone of the settings.</returns>
        public MongoClientSettings Clone()
        {
            var clone = new MongoClientSettings();

            clone._applicationName     = _applicationName;
            clone._clusterConfigurator = _clusterConfigurator;
            clone._connectionMode      = _connectionMode;
            clone._connectTimeout      = _connectTimeout;
            clone._credentials         = _credentials;
            clone._guidRepresentation  = _guidRepresentation;
            clone._heartbeatInterval   = _heartbeatInterval;
            clone._heartbeatTimeout    = _heartbeatTimeout;
            clone._ipv6 = _ipv6;
            clone._maxConnectionIdleTime = _maxConnectionIdleTime;
            clone._maxConnectionLifeTime = _maxConnectionLifeTime;
            clone._maxConnectionPoolSize = _maxConnectionPoolSize;
            clone._minConnectionPoolSize = _minConnectionPoolSize;
            clone._readConcern           = _readConcern;
            clone._readEncoding          = _readEncoding;
            clone._readPreference        = _readPreference;
            clone._replicaSetName        = _replicaSetName;
            clone._localThreshold        = _localThreshold;
            clone._servers = new List <MongoServerAddress>(_servers);
            clone._serverSelectionTimeout = _serverSelectionTimeout;
            clone._socketTimeout          = _socketTimeout;
            clone._sslSettings            = (_sslSettings == null) ? null : _sslSettings.Clone();
            clone._useSsl = _useSsl;
            clone._verifySslCertificate = _verifySslCertificate;
            clone._waitQueueSize        = _waitQueueSize;
            clone._waitQueueTimeout     = _waitQueueTimeout;
            clone._writeConcern         = _writeConcern;
            clone._writeEncoding        = _writeEncoding;
            return(clone);
        }
 // public methods
 /// <summary>
 /// Creates a clone of the settings.
 /// </summary>
 /// <returns>A clone of the settings.</returns>
 public MongoClientSettings Clone()
 {
     var clone = new MongoClientSettings();
     clone._allowInsecureTls = _allowInsecureTls;
     clone._applicationName = _applicationName;
     clone._autoEncryptionOptions = _autoEncryptionOptions;
     clone._compressors = _compressors;
     clone._clusterConfigurator = _clusterConfigurator;
     clone._connectionMode = _connectionMode;
     clone._connectionModeSwitch = _connectionModeSwitch;
     clone._connectTimeout = _connectTimeout;
     clone._credentials = _credentials;
     clone._directConnection = _directConnection;
     clone._guidRepresentation = _guidRepresentation;
     clone._heartbeatInterval = _heartbeatInterval;
     clone._heartbeatTimeout = _heartbeatTimeout;
     clone._ipv6 = _ipv6;
     clone._maxConnectionIdleTime = _maxConnectionIdleTime;
     clone._maxConnectionLifeTime = _maxConnectionLifeTime;
     clone._maxConnectionPoolSize = _maxConnectionPoolSize;
     clone._minConnectionPoolSize = _minConnectionPoolSize;
     clone._readConcern = _readConcern;
     clone._readEncoding = _readEncoding;
     clone._readPreference = _readPreference;
     clone._replicaSetName = _replicaSetName;
     clone._retryReads = _retryReads;
     clone._retryWrites = _retryWrites;
     clone._localThreshold = _localThreshold;
     clone._scheme = _scheme;
     clone._sdamLogFilename = _sdamLogFilename;
     clone._servers = new List<MongoServerAddress>(_servers);
     clone._serverSelectionTimeout = _serverSelectionTimeout;
     clone._socketTimeout = _socketTimeout;
     clone._sslSettings = (_sslSettings == null) ? null : _sslSettings.Clone();
     clone._useTls = _useTls;
     clone._waitQueueSize = _waitQueueSize;
     clone._waitQueueTimeout = _waitQueueTimeout;
     clone._writeConcern = _writeConcern;
     clone._writeEncoding = _writeEncoding;
     return clone;
 }