public CachedMeasurementRepository( SensateContext context, IGeoQueryService geo, ILogger <MeasurementRepository> logger, ICacheStrategy <string> cache) : base(context, geo, logger) { this._cache = cache; }
public GeocodioQueryServiceTests() { var mockParser = new Mock <IGeoQueryParser>(); mockParser.Setup(p => p.Parse(It.IsAny <string>())).Returns(new Dictionary <string, string>() { { "postal_code", "12345" } }); var mockQueryDispatchSvc = new Mock <IGeoQueryDispatchService>(); mockQueryDispatchSvc.Setup(q => q.Query(It.IsAny <string>())).ReturnsAsync(new GeoResponse()); var mockMemcachedClient = new Mock <IMemcachedClient>(); var mockOpResult = new Mock <IGetOperationResult <GeoResponse> >(); mockMemcachedClient.Setup(m => m.GetAsync <GeoResponse>(It.IsAny <string>())).Returns(Task.FromResult(mockOpResult.Object)); _geocodioQueryService = new GeocodioQueryService(mockParser.Object, mockQueryDispatchSvc.Object, mockMemcachedClient.Object); }
public WeatherController(IGeoQueryService geoQueryService, IWeatherQueryService weatherQueryService) { this._geoQueryService = geoQueryService; this._weatherQueryService = weatherQueryService; }
public MeasurementRepository(SensateContext context, IGeoQueryService geo, ILogger <MeasurementRepository> logger) : base(context.Measurements) { this._logger = logger; this.m_geoService = geo; }
public MessageRepository(SensateContext ctx, IGeoQueryService geo) : base(ctx.Messages) { this._geoService = geo; }