Esempio n. 1
0
 /// <summary>
 /// Gets a new Instance
 /// </summary>
 public void Generate()
 {
     lock (SyncGenerate)
     {
         _mongo    = MongoServer.Create(_mongoSettings.GetSettigns());
         _database = _mongo.GetDatabase(_mongoSettings.Database);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MongoHelper"/> class.
 /// </summary>
 /// <param name="mongoSettings">The mongo settings.</param>
 internal MongoHelper(IMongoSettings mongoSettings)
 {
     _mongoSettings = mongoSettings;
     _mongo = MongoServer.Create(mongoSettings.GetSettigns());
     _database = _mongo.GetDatabase(mongoSettings.Database);
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MongoHelper"/> class.
 /// </summary>
 /// <param name="mongoSettings">The mongo settings.</param>
 internal MongoHelper(IMongoSettings mongoSettings)
 {
     _mongoSettings = mongoSettings;
     _mongo         = MongoServer.Create(mongoSettings.GetSettigns());
     _database      = _mongo.GetDatabase(mongoSettings.Database);
 }