Ejemplo n.º 1
0
        public MongoDataService(MarketObserverConfiguration marketObserverConfiguration)
        {
            var database = new MongoClient(marketObserverConfiguration.MarketObserverDbSettings.ConnectionString).GetDatabase(marketObserverConfiguration.MarketObserverDbSettings.DatabaseName);

            _collection = database.GetCollection <TDocument>(GetCollectionName(typeof(TDocument)));
        }
 public MarketStackHttpClient(IOptions <MarketObserverConfiguration> marketObserverConfiguration)
 {
     this._Configuration = marketObserverConfiguration.Value;
     base.BaseAddress    = new Uri(this._Configuration.ApiEndpoints.MarketStack.BaseUrl);
     base.DefaultRequestHeaders.Clear();
 }