Beispiel #1
0
        public UnitRepository()
        {
            MongoDBOptions options = new MongoDBOptions("mongodb://localhost", false);

            _options = options;
            _proxy   = MongoProxy.Instance(_options.ConnectionString);
        }
Beispiel #2
0
 public static MongoProxy Instance(string connectionString)
 {
     if (_instance == null)
     {
         lock (_lockObject)
         {
             if (_instance == null)
             {
                 _instance = new MongoProxy(connectionString);
             }
         }
     }
     return(_instance);
 }
Beispiel #3
0
 public UnitRepository(MongoDBOptions options)
 {
     _options = options;
     _proxy   = MongoProxy.Instance(_options.ConnectionString);
 }
Beispiel #4
0
 public NodeRepository(MongoDBOptions options, IUnitRepository unitRepository)
 {
     _options        = options;
     _proxy          = MongoProxy.Instance(_options.ConnectionString);
     _unitRepository = unitRepository;
 }