Пример #1
0
        public UnitRepository()
        {
            MongoDBOptions options = new MongoDBOptions("mongodb://localhost", false);

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