MongoDB.Driver.MongoServerSettings.FrozenCopy C# (CSharp) 메소드

FrozenCopy() 공개 메소드

Returns a frozen copy of the settings.
public FrozenCopy ( ) : MongoServerSettings
리턴 MongoServerSettings
        public MongoServerSettings FrozenCopy()
        {
            if (_isFrozen)
            {
                return this;
            }
            else
            {
                return Clone().Freeze();
            }
        }

Usage Example

        // constructors
        /// <summary>
        /// Creates a new instance of MongoServer. Normally you will use one of the Create methods instead
        /// of the constructor to create instances of this class.
        /// </summary>
        /// <param name="settings">The settings for this instance of MongoServer.</param>
        public MongoServer(MongoServerSettings settings)
        {
            _settings     = settings.FrozenCopy();
            _sequentialId = Interlocked.Increment(ref __nextSequentialId);
            // Console.WriteLine("MongoServer[{0}]: {1}", sequentialId, settings);

            _serverProxy = new MongoServerProxyFactory().Create(_settings);
        }
All Usage Examples Of MongoDB.Driver.MongoServerSettings::FrozenCopy