/// <summary> /// Service's constructor /// </summary> /// <param name="clinetsFactory"></param> /// <param name="elasticSearchGateway"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="osmRepository"></param> /// <param name="pointsOfInterestAdapterFactory"></param> /// <param name="featuresMergeExecutor"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="graphHopperGateway"></param> /// <param name="pointsOfInterestFilesCreatorExecutor"></param> /// <param name="elevationDataStorage"></param> /// <param name="itmWgs84MathTransfromFactory"></param> /// <param name="logger"></param> public DatabasesUpdaterService(IClientsFactory clinetsFactory, IElasticSearchGateway elasticSearchGateway, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, ITagsHelper tagsHelper, IOsmRepository osmRepository, IPointsOfInterestAdapterFactory pointsOfInterestAdapterFactory, IFeaturesMergeExecutor featuresMergeExecutor, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, IGraphHopperGateway graphHopperGateway, IPointsOfInterestFilesCreatorExecutor pointsOfInterestFilesCreatorExecutor, IElevationDataStorage elevationDataStorage, IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory, ILogger logger) { _elasticSearchGateway = elasticSearchGateway; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _tagsHelper = tagsHelper; _osmRepository = osmRepository; _pointsOfInterestAdapterFactory = pointsOfInterestAdapterFactory; _pointsOfInterestFilesCreatorExecutor = pointsOfInterestFilesCreatorExecutor; _featuresMergeExecutor = featuresMergeExecutor; _latestFileFetcherExecutor = latestFileFetcherExecutor; _graphHopperGateway = graphHopperGateway; _osmGateway = clinetsFactory.CreateNonAuthClient(); _elevationDataStorage = elevationDataStorage; _logger = logger; _mathTransform = itmWgs84MathTransfromFactory.CreateInverse(); }
public ProfileController( HttpServerUtilityBase server, IUploadService <Photo> uploadPhotoService, IUploadService <Tag> uploadTagService, IPhotoService photoService, IPhotoUploader photoUploader, ITagsHelper tagsHelper, IUserProvider userProvider, IPagingProvider <PhotoViewModel> pagingProvider) { Guard.WhenArgument(server, "server").IsNull().Throw(); Guard.WhenArgument(uploadPhotoService, "uploadPhotoService").IsNull().Throw(); Guard.WhenArgument(uploadTagService, "uploadTagService").IsNull().Throw(); Guard.WhenArgument(photoService, "photoService").IsNull().Throw(); Guard.WhenArgument(photoUploader, "photoUploader").IsNull().Throw(); Guard.WhenArgument(tagsHelper, "tagsHelper").IsNull().Throw(); Guard.WhenArgument(userProvider, "userProvider").IsNull().Throw(); Guard.WhenArgument(pagingProvider, "pagingProvider").IsNull().Throw(); this.server = server; this.uploadPhotoService = uploadPhotoService; this.uploadTagService = uploadTagService; this.photoService = photoService; this.photoUploader = photoUploader; this.tagsHelper = tagsHelper; this.userProvider = userProvider; this.pagingProvider = pagingProvider; }
/// <summary> /// Class constructor /// </summary> /// <param name="elasticSearchGateway"></param> /// <param name="elevationDataStorage"></param> /// <param name="httpGatewayFactory"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="osmRepository"></param> /// <param name="dataContainerConverterService"></param> /// <param name="wikipediaGateway"></param> /// <param name="itmWgs84MathTransfromFactory"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="options"></param> /// <param name="logger"></param> public OsmPointsOfInterestAdapter(IElasticSearchGateway elasticSearchGateway, IElevationDataStorage elevationDataStorage, IHttpGatewayFactory httpGatewayFactory, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, IOsmRepository osmRepository, IDataContainerConverterService dataContainerConverterService, IWikipediaGateway wikipediaGateway, IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, ITagsHelper tagsHelper, IOptions <ConfigurationData> options, ILogger logger) : base(elevationDataStorage, elasticSearchGateway, dataContainerConverterService, itmWgs84MathTransfromFactory, options, logger) { _httpGatewayFactory = httpGatewayFactory; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _osmRepository = osmRepository; _wikipediaGateway = wikipediaGateway; _tagsHelper = tagsHelper; _latestFileFetcherExecutor = latestFileFetcherExecutor; }
/// <summary> /// Service's constructor /// </summary> /// <param name="clinetsFactory"></param> /// <param name="elasticSearchGateway"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="osmRepository"></param> /// <param name="pointsOfInterestAdapterFactory"></param> /// <param name="featuresMergeExecutor"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="graphHopperGateway"></param> /// <param name="pointsOfInterestFilesCreatorExecutor"></param> /// <param name="imagesUrlsStorageExecutor"></param> /// <param name="logger"></param> public DatabasesUpdaterService(IClientsFactory clinetsFactory, IElasticSearchGateway elasticSearchGateway, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, ITagsHelper tagsHelper, IOsmRepository osmRepository, IPointsOfInterestAdapterFactory pointsOfInterestAdapterFactory, IFeaturesMergeExecutor featuresMergeExecutor, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, IGraphHopperGateway graphHopperGateway, IPointsOfInterestFilesCreatorExecutor pointsOfInterestFilesCreatorExecutor, IImagesUrlsStorageExecutor imagesUrlsStorageExecutor, ILogger logger) { _elasticSearchGateway = elasticSearchGateway; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _tagsHelper = tagsHelper; _osmRepository = osmRepository; _pointsOfInterestAdapterFactory = pointsOfInterestAdapterFactory; _pointsOfInterestFilesCreatorExecutor = pointsOfInterestFilesCreatorExecutor; _featuresMergeExecutor = featuresMergeExecutor; _latestFileFetcherExecutor = latestFileFetcherExecutor; _graphHopperGateway = graphHopperGateway; _osmGateway = clinetsFactory.CreateNonAuthClient(); _imagesUrlsStorageExecutor = imagesUrlsStorageExecutor; _logger = logger; }
/// <summary> /// Class constructor /// </summary> /// <param name="elasticSearchGateway"></param> /// <param name="elevationDataStorage"></param> /// <param name="clentsFactory"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="osmRepository"></param> /// <param name="dataContainerConverterService"></param> /// <param name="wikipediaGateway"></param> /// <param name="itmWgs84MathTransfromFactory"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="options"></param> /// <param name="logger"></param> public OsmPointsOfInterestAdapter(IElasticSearchGateway elasticSearchGateway, IElevationDataStorage elevationDataStorage, IClientsFactory clentsFactory, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, IOsmRepository osmRepository, IDataContainerConverterService dataContainerConverterService, IWikipediaGateway wikipediaGateway, IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, ITagsHelper tagsHelper, IOptions <ConfigurationData> options, ILogger logger) : base(dataContainerConverterService, logger) { _clientsFactory = clentsFactory; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _osmRepository = osmRepository; _wikipediaGateway = wikipediaGateway; _tagsHelper = tagsHelper; _latestFileFetcherExecutor = latestFileFetcherExecutor; _elevationDataStorage = elevationDataStorage; _wgs84ItmMathTransform = itmWgs84MathTransfromFactory.CreateInverse(); _options = options.Value; _elasticSearchGateway = elasticSearchGateway; }
public ProfileController( HttpServerUtilityBase server, IUploadService <Tag> uploadTagService, IModifyService <Photo> modifyPhotoService, IDeleteService <Photo> deletePhotoService, IPhotoService photoService, IPhotoUploader photoUploader, IPhotoConverter photoConverter, ITagsHelper tagsHelper) { Guard.WhenArgument(server, "server").IsNull().Throw(); Guard.WhenArgument(uploadTagService, "uploadTagService").IsNull().Throw(); Guard.WhenArgument(modifyPhotoService, "modifyPhotoService").IsNull().Throw(); Guard.WhenArgument(deletePhotoService, "deletePhotoService").IsNull().Throw(); Guard.WhenArgument(photoService, "photoService").IsNull().Throw(); Guard.WhenArgument(photoUploader, "photoUploader").IsNull().Throw(); Guard.WhenArgument(photoConverter, "photoConverter").IsNull().Throw(); Guard.WhenArgument(tagsHelper, "tagsHelper").IsNull().Throw(); this.server = server; this.uploadTagService = uploadTagService; this.modifyPhotoService = modifyPhotoService; this.deletePhotoService = deletePhotoService; this.photoService = photoService; this.photoUploader = photoUploader; this.photoConverter = photoConverter; this.tagsHelper = tagsHelper; }
public void TestInitialize() { _configuration = new ConfigurationData(); var options = Substitute.For <IOptions <ConfigurationData> >(); options.Value.Returns(_configuration); _tagsHelper = new TagsHelper(options); }
/// <summary> /// Constructor /// </summary> /// <param name="logger"></param> /// <param name="osmGeoJsonConverter"></param> /// <param name="tagsHelper"></param> public OsmGeoJsonPreprocessorExecutor(ILogger logger, IOsmGeoJsonConverter osmGeoJsonConverter, ITagsHelper tagsHelper) { _logger = logger; _osmGeoJsonConverter = osmGeoJsonConverter; _tagsHelper = tagsHelper; }
public void TestInitialize() { InitializeSubstitues(); _httpGatewayFactory = Substitute.For <IHttpGatewayFactory>(); _tagsHelper = new TagsHelper(_options); _osmGeoJsonPreprocessorExecutor = new OsmGeoJsonPreprocessorExecutor(Substitute.For <ILogger>(), new OsmGeoJsonConverter(), _tagsHelper); _osmRepository = Substitute.For <IOsmRepository>(); _wikipediaGateway = Substitute.For <IWikipediaGateway>(); _latestFileFetcherExecutor = Substitute.For <IOsmLatestFileFetcherExecutor>(); _adapter = new OsmPointsOfInterestAdapter(_elasticSearchGateway, _elevationDataStorage, _httpGatewayFactory, _osmGeoJsonPreprocessorExecutor, _osmRepository, _dataContainerConverterService, _wikipediaGateway, _itmWgs84MathTransfromFactory, _latestFileFetcherExecutor, _tagsHelper, _options, Substitute.For <ILogger>()); }
public void TestInitialize() { _elasticSearchGateway = Substitute.For <IElasticSearchGateway>(); _elevationDataStorage = Substitute.For <IElevationDataStorage>(); _httpGatewayFactory = Substitute.For <IHttpGatewayFactory>(); _tagsHelper = new TagsHelper(new OptionsWrapper <ConfigurationData>(new ConfigurationData())); _osmGeoJsonPreprocessorExecutor = new OsmGeoJsonPreprocessorExecutor(Substitute.For <ILogger>(), new OsmGeoJsonConverter(), _tagsHelper); _osmRepository = Substitute.For <IOsmRepository>(); _dataContainerConverterService = Substitute.For <IDataContainerConverterService>(); _adapter = new OsmPointsOfInterestAdapter(_elasticSearchGateway, _elevationDataStorage, _httpGatewayFactory, _osmGeoJsonPreprocessorExecutor, _osmRepository, _dataContainerConverterService, _tagsHelper); }
/// <summary> /// Controller's constructor /// </summary> /// <param name="adapters"></param> /// <param name="tagsHelper"></param> /// <param name="wikimediaCommonGateway"></param> /// <param name="cache"></param> public PointsOfInterestController(IEnumerable <IPointsOfInterestAdapter> adapters, ITagsHelper tagsHelper, IWikimediaCommonGateway wikimediaCommonGateway, LruCache <string, TokenAndSecret> cache) { _adapters = adapters.ToDictionary(a => a.Source, a => a); _tagsHelper = tagsHelper; _cache = cache; _wikimediaCommonGateway = wikimediaCommonGateway; }
/// <summary> /// Constructor /// </summary> /// <param name="logger"></param> /// <param name="elevationDataStorage"></param> /// <param name="itmWgs84MathTransfromFactory"></param> /// <param name="osmGeoJsonConverter"></param> /// <param name="tagsHelper"></param> public OsmGeoJsonPreprocessorExecutor(ILogger logger, IElevationDataStorage elevationDataStorage, IItmWgs84MathTransfromFactory itmWgs84MathTransfromFactory, IOsmGeoJsonConverter osmGeoJsonConverter, ITagsHelper tagsHelper) { _logger = logger; _osmGeoJsonConverter = osmGeoJsonConverter; _elevationDataStorage = elevationDataStorage; _wgs84ItmConverter = itmWgs84MathTransfromFactory.CreateInverse(); _tagsHelper = tagsHelper; }
public void TestInitialize() { _pointsOfInterestProvider = Substitute.For <IPointsOfInterestProvider>(); _pointsOfInterestAggregatorService = Substitute.For <IPointsOfInterestAggregatorService>(); _tagHelper = Substitute.For <ITagsHelper>(); _wikimediaCommonGateway = Substitute.For <IWikimediaCommonGateway>(); _osmGateway = Substitute.For <IOsmGateway>(); var cache = new LruCache <string, TokenAndSecret>(Substitute.For <IOptions <ConfigurationData> >(), Substitute.For <ILogger>()); var factory = Substitute.For <IHttpGatewayFactory>(); factory.CreateOsmGateway(Arg.Any <TokenAndSecret>()).Returns(_osmGateway); _controller = new PointsOfInterestController(factory, _tagHelper, _wikimediaCommonGateway, _pointsOfInterestProvider, _pointsOfInterestAggregatorService, new Base64ImageStringToFileConverter(), cache); }
/// <inheritdoc /> public OsmPointsOfInterestAdapter(IElasticSearchGateway elasticSearchGateway, IElevationDataStorage elevationDataStorage, IHttpGatewayFactory httpGatewayFactory, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, IOsmRepository osmRepository, ITagsHelper tagsHelper) : base(elevationDataStorage, elasticSearchGateway) { _elasticSearchGateway = elasticSearchGateway; _httpGatewayFactory = httpGatewayFactory; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _osmRepository = osmRepository; _tagsHelper = tagsHelper; }
/// <summary> /// Service's constructor /// </summary> /// <param name="factory"></param> /// <param name="elasticSearchGateway"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="osmRepository"></param> /// <param name="adapters"></param> /// <param name="logger"></param> public OsmElasticSearchUpdaterService(IHttpGatewayFactory factory, IElasticSearchGateway elasticSearchGateway, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, ITagsHelper tagsHelper, IOsmRepository osmRepository, IEnumerable <IPointsOfInterestAdapter> adapters, ILogger logger) { _elasticSearchGateway = elasticSearchGateway; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _tagsHelper = tagsHelper; _osmRepository = osmRepository; _adapters = adapters; _logger = logger; _osmGateway = factory.CreateOsmGateway(new TokenAndSecret("", "")); }
/// <summary> /// Controller's constructor /// </summary> /// <param name="clientsFactory"></param> /// <param name="tagsHelper"></param> /// <param name="wikimediaCommonGateway"></param> /// <param name="pointsOfInterestProvider"></param> /// <param name="base64ImageConverter"></param> /// <param name="options"></param> /// <param name="cache"></param> public PointsOfInterestController(IClientsFactory clientsFactory, ITagsHelper tagsHelper, IWikimediaCommonGateway wikimediaCommonGateway, IPointsOfInterestProvider pointsOfInterestProvider, IBase64ImageStringToFileConverter base64ImageConverter, IOptions <ConfigurationData> options, LruCache <string, TokenAndSecret> cache) { _clientsFactory = clientsFactory; _tagsHelper = tagsHelper; _cache = cache; _base64ImageConverter = base64ImageConverter; _pointsOfInterestProvider = pointsOfInterestProvider; _wikimediaCommonGateway = wikimediaCommonGateway; _options = options.Value; }
/// <summary> /// Controller's constructor /// </summary> /// <param name="httpGatewayFactory"></param> /// <param name="tagsHelper"></param> /// <param name="wikimediaCommonGateway"></param> /// <param name="pointsOfInterestProvider"></param> /// <param name="pointsOfInterestAggregatorService"></param> /// <param name="base64ImageConverter"></param> /// <param name="cache"></param> public PointsOfInterestController(IHttpGatewayFactory httpGatewayFactory, ITagsHelper tagsHelper, IWikimediaCommonGateway wikimediaCommonGateway, IPointsOfInterestProvider pointsOfInterestProvider, IPointsOfInterestAggregatorService pointsOfInterestAggregatorService, IBase64ImageStringToFileConverter base64ImageConverter, LruCache <string, TokenAndSecret> cache) { _httpGatewayFactory = httpGatewayFactory; _tagsHelper = tagsHelper; _cache = cache; _base64ImageConverter = base64ImageConverter; _pointsOfInterestAggregatorService = pointsOfInterestAggregatorService; _pointsOfInterestProvider = pointsOfInterestProvider; _wikimediaCommonGateway = wikimediaCommonGateway; }
/// <summary> /// Service's constructor /// </summary> /// <param name="factory"></param> /// <param name="elasticSearchGateway"></param> /// <param name="osmGeoJsonPreprocessorExecutor"></param> /// <param name="tagsHelper"></param> /// <param name="osmRepository"></param> /// <param name="pointsOfInterestAdapterFactory"></param> /// <param name="featuresMergeExecutor"></param> /// <param name="latestFileFetcherExecutor"></param> /// <param name="graphHopperGateway"></param> /// <param name="logger"></param> public ElasticSearchUpdaterService(IHttpGatewayFactory factory, IElasticSearchGateway elasticSearchGateway, IOsmGeoJsonPreprocessorExecutor osmGeoJsonPreprocessorExecutor, ITagsHelper tagsHelper, IOsmRepository osmRepository, IPointsOfInterestAdapterFactory pointsOfInterestAdapterFactory, IFeaturesMergeExecutor featuresMergeExecutor, IOsmLatestFileFetcherExecutor latestFileFetcherExecutor, IGraphHopperGateway graphHopperGateway, ILogger logger) { _elasticSearchGateway = elasticSearchGateway; _osmGeoJsonPreprocessorExecutor = osmGeoJsonPreprocessorExecutor; _tagsHelper = tagsHelper; _osmRepository = osmRepository; _pointsOfInterestAdapterFactory = pointsOfInterestAdapterFactory; _logger = logger; _featuresMergeExecutor = featuresMergeExecutor; _latestFileFetcherExecutor = latestFileFetcherExecutor; _graphHopperGateway = graphHopperGateway; _osmGateway = factory.CreateOsmGateway(new TokenAndSecret("", "")); }
public void TestInitialize() { _pointsOfInterestProvider = Substitute.For <IPointsOfInterestProvider>(); _tagHelper = Substitute.For <ITagsHelper>(); _wikimediaCommonGateway = Substitute.For <IWikimediaCommonGateway>(); _osmGateway = Substitute.For <IAuthClient>(); _imagesUrlsStorageExecutor = Substitute.For <IImagesUrlsStorageExecutor>(); var optionsProvider = Substitute.For <IOptions <ConfigurationData> >(); optionsProvider.Value.Returns(new ConfigurationData()); _cache = new LruCache <string, TokenAndSecret>(optionsProvider, Substitute.For <ILogger>()); var factory = Substitute.For <IClientsFactory>(); factory.CreateOAuthClient(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>(), Arg.Any <string>()).Returns(_osmGateway); _controller = new PointsOfInterestController(factory, _tagHelper, _wikimediaCommonGateway, _pointsOfInterestProvider, new Base64ImageStringToFileConverter(), _imagesUrlsStorageExecutor, optionsProvider, _cache); }