/// <summary>
 /// Constructs the storage to persist subscriptions in the given collection, in the database specified by the connection string.
 /// </summary>
 public MongoDbSubscriptionStorage(string connectionString, string collectionName)
 {
     this.collectionName = collectionName;
     database            = database = MongoHelper.GetDatabase(connectionString);
 }
Exemple #2
0
 /// <summary>
 /// Constructs the timeout storage, connecting to the Mongo database pointed to by the given connection string,
 /// storing the timeouts in the given collection
 /// </summary>
 public MongoDbTimeoutStorage(string connectionString, string collectionName)
 {
     database   = MongoHelper.GetDatabase(connectionString);
     collection = database.GetCollection(collectionName);
     collection.EnsureIndex(IndexKeys.Ascending(TimeProperty), IndexOptions.SetBackground(true).SetUnique(false));
 }