Esempio n. 1
0
        public UnitRepository()
        {
            MongoDBOptions options = new MongoDBOptions("mongodb://localhost", false);

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