// constructors
 /// <summary>
 /// Initializes a new instance of the <see cref="ReplicaSetInformation"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="primary">The primary.</param>
 /// <param name="members">The members.</param>
 /// <param name="tagSet">The tag set.</param>
 public ReplicaSetInformation(string name, MongoServerAddress primary, IEnumerable <MongoServerAddress> members, ReplicaSetTagSet tagSet)
 {
     _name    = name;
     _primary = primary;
     _members = members == null ? new List <MongoServerAddress>() : members.ToList();
     _tagSet  = tagSet.FrozenCopy();
 }
Ejemplo n.º 2
0
        // constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="ReplicaSetInformation"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="primary">The primary.</param>
        /// <param name="members">The members.</param>
        /// <param name="tagSet">The tag set.</param>
        public ReplicaSetInformation(string name, MongoServerAddress primary, IEnumerable <MongoServerAddress> members, ReplicaSetTagSet tagSet)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            _name    = name;
            _primary = primary;
            _members = members == null ? new List <MongoServerAddress>() : members.ToList();
            _tagSet  = tagSet.FrozenCopy();
        }