public BotServices( IMtgStore store, ICardPriceStore priceStore, ICommandParser commandParser, IHttpClient httpClient, IUrlShortener urlShortener, IQueryStatisticsStore queryStatisticsStore, IAutocompleter autocompleter) { if (store == null) { throw new ArgumentNullException("store"); } if (priceStore == null) { throw new ArgumentNullException("priceStore"); } if (commandParser == null) { throw new ArgumentNullException("commandParser"); } if (httpClient == null) { throw new ArgumentNullException("httpClient"); } if (urlShortener == null) { throw new ArgumentNullException("urlShortener"); } if (queryStatisticsStore == null) { throw new ArgumentNullException("queryStatisticsStore"); } if (autocompleter == null) { throw new ArgumentNullException("autocompleter"); } this.mStore = store; this.mPriceStore = priceStore; this.mCommandParser = commandParser; this.mHttpClient = httpClient; this.mUrlShortener = urlShortener; this.mQueryStatisticsStore = queryStatisticsStore; this.mAutocompleter = autocompleter; }
public MtgStore( string connectionString, string databaseName, IQueryStatisticsStore queryStatisticsStore, ILoggingService loggingService, SearchUtility searchUtility) { if (string.IsNullOrEmpty(connectionString)) { throw new ArgumentException("connectionString"); } if (string.IsNullOrEmpty(databaseName)) { throw new ArgumentException("databaseName"); } if (queryStatisticsStore == null) { throw new ArgumentNullException("queryStatisticsStore"); } if (loggingService == null) { throw new ArgumentNullException("loggingService"); } if (searchUtility == null) { throw new ArgumentNullException("searchUtility"); } this.mConnectionString = connectionString; this.mDatabaseName = databaseName; this.mClient = new MongoClient(this.mConnectionString); this.mDatabase = this.mClient.GetDatabase(this.mDatabaseName); this.mQueryStatisticsStore = queryStatisticsStore; this.mLoggingService = loggingService; this.mSearchUtility = searchUtility; }