public GeoInformationController( IGeoIPService geoIpService, IObjectMappingService objectMappingService, IDiagnosticsTracingService diagnosticsTracingService, IPrincipalService principalService) : base(diagnosticsTracingService, principalService) { _geoIpService = geoIpService; _objectMappingService = objectMappingService; }
private static async Task<IGeoIPService> GetResolverAsync() { if (_service != null) return _service; var dataDirectory = PathHelper.ExpandPath(".\\"); var storage = new FolderFileStorage(dataDirectory); if (!await storage.ExistsAsync(MindMaxGeoIPService.GEO_IP_DATABASE_PATH)) { var job = new DownloadGeoIPDatabaseJob(new InMemoryCacheClient(), storage); var result = await job.RunAsync(); Assert.NotNull(result); Assert.True(result.IsSuccess); } return _service = new MindMaxGeoIPService(storage); }
private static async Task <IGeoIPService> GetResolverAsync() { if (_service != null) { return(_service); } var dataDirectory = PathHelper.ExpandPath(".\\"); var storage = new FolderFileStorage(dataDirectory); if (!await storage.ExistsAsync(MindMaxGeoIPService.GEO_IP_DATABASE_PATH)) { var job = new DownloadGeoIPDatabaseJob(new InMemoryCacheClient(), storage); var result = await job.RunAsync(); Assert.NotNull(result); Assert.True(result.IsSuccess); } return(_service = new MindMaxGeoIPService(storage)); }
public GeoPlugin(IGeoIPService geoIpService) { _geoIpService = geoIpService; }