Пример #1
0
        public MongoConnection(
            List <string> servers,
            string adminDB,
            string database,
            string username,
            string password,
            string replicateSet,
            bool useSsl,
            bool verifySsl)
        {
            configuration              = new MongoConfiguration();
            configuration.Servers      = servers;
            configuration.AdminDB      = adminDB;
            configuration.Database     = database;
            configuration.Username     = username;
            configuration.Password     = password;
            configuration.ReplicateSet = replicateSet;
            configuration.UseSsl       = useSsl;
            configuration.VerifySsl    = verifySsl;

            connect();
        }
Пример #2
0
 public MongoConnection(MongoConfiguration configuration)
 {
     this.configuration = configuration;
     connect();
 }