public KontrollstellenInformer(IBus bus, IElasticService elasticService, AutomatischeBenachrichtigungAnKontrollstelle template) { this.bus = bus; this.elasticService = elasticService; this.template = template; }
public EntityDecorator(IElasticService elasticService, IElasticSettings elasticSettings, IEntityProvider entityProvider, IModelData modelData) { this.elasticService = elasticService; this.elasticSettings = elasticSettings; this.entityProvider = entityProvider; this.modelData = modelData; }
public ProductsController(IProductService productService, IUserService userService, IElasticService <Product> elasticProductService, IProductMessageService productMessageService) { _productService = productService; _userService = userService; _productMessageService = productMessageService; _elasticProductService = elasticProductService; }
public RecepyService(IElasticService elasticService) { this.elasticService = elasticService; client = elasticService.GetClient(); elasticService.CreateIndex(new RecepyModel(), "testindex"); AddRecepies(); }
public EntityProvider(ITranslator translator, IElasticService elasticService, IElasticSettings elasticSettings, IModelData modelData) { this.translator = translator; this.elasticService = elasticService; this.elasticSettings = elasticSettings; this.modelData = modelData; }
public CragsManager(ICragsRepository cragsRepository, ICacheHandler cacheHandler, IStatisticsService statisticsService, IElasticService elasticService) : base(cragsRepository) { _cragsRepository = cragsRepository; _cragsCache = cacheHandler.CragsCache; _cragsCacheLock = cacheHandler.CragsCacheLock; _statisticsService = statisticsService; _elasticService = elasticService; }
public DeletedPhotosService( IMapper mapper, IAuthService authService, IElasticService elasticService, IPhotoBlobStorage blobStorage) : base(mapper, authService, elasticService, blobStorage) { }
public EsEntryPointActor(IInjector injector) { _injector = injector; _elastic = injector.Get <IElasticService>(); Receive <IActorRef>(e => _indexAlbum = e); AwaitElastic(); }
public AreasManager(IAreasRepository areasRepository, ICacheHandler cacheHandler, IStatisticsService statisticsService, IElasticService elasticService) : base(areasRepository) { _areasRepository = areasRepository; _cragsCache = cacheHandler.CragsCache; _cragsCacheLock = cacheHandler.CragsCacheLock; _statisticsService = statisticsService; _elasticService = elasticService; }
public RoutesManager(IRoutesRepository routesRepository, ICacheHandler cacheHandler, IStatisticsService statisticsService, IElasticService elasticService) : base(routesRepository) { _routesRepository = routesRepository; _cragsCache = cacheHandler.CragsCache; _cragsCacheLock = cacheHandler.CragsCacheLock; _statisticsService = statisticsService; _elasticService = elasticService; }
public AnimalController(ICrudService <Animal> crudService, IElasticService elasticService, ICrudService <MedicalData> medicalDataService, ICrudService <AnimalMedicalData> animalMedicalDataService) { this._crudService = crudService; this._elasticService = elasticService; this._animalMedicalDataService = animalMedicalDataService; this._medicalDataService = medicalDataService; }
public PhotoService( IMapper mapper, IAuthService authService, IElasticService elasticService, IPhotoBlobStorage blobStorage, IImageService imageService) : base(mapper, authService, elasticService, blobStorage) { _imageService = imageService; }
protected PhotoServiceBase( IMapper mapper, IAuthService authService, IElasticService elasticService, IPhotoBlobStorage blobStorage) { _mapper = mapper; _authService = authService; _elasticService = elasticService; _blobStorage = blobStorage; }
public ValuesController(ILogger <ValuesController> logger, IHttpContextAccessor accessor, IUserService userService, IElasticService eService, IMongoService mongoService) { _logger = logger; _accessor = accessor; _userService = userService; _eService = eService; _mongoService = mongoService; }
private IActionResult PostEntities <T, G>(string resourcesPath, IElasticService <T, G> service) where G : IEntity <T> { try { var count = service.Import(resourcesPath); return(Ok($"Imported {count} entities")); } catch (Exception e) { return(BadRequest(e.Message)); } }
public OrderController(OrderManagerClient client, IEntityProvider entityProvider, IKontrollstellenInformer kontrollstellenInformer, IElasticService elasticService, DigitalisierungsbeschraenkungSettings digitalisierungsbeschraenkungSettings, IUserDataAccess userDataAccess) { this.client = client; this.entityProvider = entityProvider; this.kontrollstellenInformer = kontrollstellenInformer; this.elasticService = elasticService; this.digitalisierungsbeschraenkungSettings = digitalisierungsbeschraenkungSettings; this.userDataAccess = userDataAccess; }
public StatisticsService(IAreasRepository areasRepository, ICragsRepository cragsRepository, ISectorsRepository sectorsRepository, IAscentsRepository ascentsRepository, ICacheHandler cacheHandler, IElasticService elasticService) { _areasRepository = areasRepository; _cragsRepository = cragsRepository; _sectorsRepository = sectorsRepository; _ascentsRepository = ascentsRepository; _cragsCache = cacheHandler.CragsCache; _cragsCacheLock = cacheHandler.CragsCacheLock; _elasticService = elasticService; }
public NetworkBuilder(List <string> source, List <string> destination, int pathMaximumLength, bool copyMaker = false) { this.Source = source; this.Destination = destination; this.PathMaximumLength = pathMaximumLength; this.CopyMaker = copyMaker; this.SimpleGraph = new Dictionary <string, HashSet <SimpleEdge> >(); this.ElasticService = new ElasticService(); this.Nodes = new HashSet <Node>(); this.Edges = new HashSet <Edge>(); this.NeighbourIncomingEdges = new Dictionary <string, HashSet <Edge> >(); this.NeighbourOutcomingEdges = new Dictionary <string, HashSet <Edge> >(); this.NeighbourNodes = new HashSet <Node>(); this.Levels = new Dictionary <string, int>(); this.SupersetGrapgh = new Dictionary <string, Node>(); }
public OrderController(IPublicOrder client, IEntityProvider entityProvider, IKontrollstellenInformer kontrollstellenInformer, IElasticService elasticService, DigitalisierungsbeschraenkungSettings digitalisierungsbeschraenkungSettings, IUserDataAccess userDataAccess, VerwaltungsausleiheSettings verwaltungsausleiheSettings, ManagementClientSettings managementClientSettings) { this.client = client; this.entityProvider = entityProvider; this.kontrollstellenInformer = kontrollstellenInformer; this.elasticService = elasticService; this.digitalisierungsbeschraenkungSettings = digitalisierungsbeschraenkungSettings; this.userDataAccess = userDataAccess; this.verwaltungsausleiheSettings = verwaltungsausleiheSettings; this.managementClientSettings = managementClientSettings; }
private IActionResult GetSearchResults <T, G>( string query, int pageIndex, IElasticService <T, G> service) where G : IEntity <T> { try { var watch = Stopwatch.StartNew(); var set = service.GetSearchResults(new Query(query), pageIndex); watch.Stop(); return(Ok(new ResultSet <G>(watch.ElapsedMilliseconds, set.Count, set))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public FileController(IRequestClient <DownloadAssetRequest, DownloadAssetResult> downloadClient, IRequestClient <GetAssetStatusRequest, GetAssetStatusResult> statusClient, IRequestClient <PrepareAssetRequest, PrepareAssetResult> prepareClient, IDownloadTokenDataAccess downloadTokenDataAccess, IDownloadLogDataAccess downloadLogDataAccess, IElasticService elasticService, IUsageAnalyzer usageAnalyzer, IUserAccessProvider userAccessProvider, ITranslator translator, ICacheHelper cacheHelper, IUserDataAccess userDataAccess, IOrderDataAccess orderDataAccess, IFileDownloadHelper downloadHelper, IKontrollstellenInformer kontrollstellenInformer) { this.usageAnalyzer = usageAnalyzer; this.translator = translator; this.cacheHelper = cacheHelper; this.downloadClient = downloadClient; this.statusClient = statusClient; this.prepareClient = prepareClient; this.downloadTokenDataAccess = downloadTokenDataAccess; this.downloadLogDataAccess = downloadLogDataAccess; this.elasticService = elasticService; this.userDataAccess = userDataAccess; this.orderDataAccess = orderDataAccess; this.downloadHelper = downloadHelper; this.kontrollstellenInformer = kontrollstellenInformer; // Workaround für Unit-Test GetUserAccessFunc = userId => { userId = string.IsNullOrWhiteSpace(userId) ? ControllerHelper.GetCurrentUserId() : userId; var language = WebHelper.GetClientLanguage(Request); return(userAccessProvider.GetUserAccess(language, userId)); }; }
public MusicController(IElasticService <int, Music> musicService) { this.musicService = musicService; }
public FavoritesController(IElasticService elasticService, VeExportRecordHelper veExportRecordHelper) { this.elasticService = elasticService; this.veExportRecordHelper = veExportRecordHelper; }
public UserQueryController(IElasticService elasticService) { this.elasticService = elasticService; }
public static async Task Run([TimerTrigger("0 */5 * * * *")] TimerInfo timer, ILogger log, [Inject] IElasticService elasticService, [Inject] IAlertsService alertsService) { log.LogInformation($"{nameof(ServiceBusMonitorTimerFunction)} function executed at: {DateTime.UtcNow:yyyy-MM-dd HH::mm:ss}"); try { alertsService.Logger = log; var elasticIndex = Environment.GetEnvironmentVariable("ElasticIndex"); var managementClient = new ManagementClient(Environment.GetEnvironmentVariable("ServiceBusConnection")); var queues = await managementClient.GetQueuesAsync(); var alertList = new List <Alert>(); foreach (var queueDescription in queues) { log.LogInformation($"Investigating queue '{queueDescription.Path}'"); var queue = await managementClient.GetQueueRuntimeInfoAsync(queueDescription.Path); var activeMessageCount = queue.MessageCountDetails.ActiveMessageCount; var deadLetterMessageCount = queue.MessageCountDetails.DeadLetterMessageCount; log.LogInformation($"Active messages: {activeMessageCount}"); log.LogInformation($"Dead letter messages: {deadLetterMessageCount}"); var list = await elasticService.ElasticQueueDetailsRepository.GetListAsync(queueDescription.Path); var single = list.FirstOrDefault(); if (single == null) { var queueDetails = new ElasticQueueDetails(queueDescription.Path) { ActiveMessagesCount = activeMessageCount, DeadletterMessagesCount = deadLetterMessageCount, TransferMessagesCount = queue.MessageCountDetails.TransferMessageCount }; await elasticService.PostAsync(elasticIndex, queueDetails); } else { var alert = await alertsService.AuditAsync(single, new ElasticQueueDetails(queueDescription.Path) { ActiveMessagesCount = activeMessageCount, DeadletterMessagesCount = deadLetterMessageCount, TransferMessagesCount = queue.MessageCountDetails.TransferMessageCount }); if (alert != null) { log.LogInformation($"Found alert and added for dispatch," + $"{Environment.NewLine}" + $"{Enum.GetName(typeof(Severity), alert.Severity)}" + $"{Environment.NewLine}" + $"Details: '{alert.Message}', {queueDescription.Path}" + $"{Environment.NewLine}"); alertList.Add(alert); } single.ActiveMessagesCount = activeMessageCount; single.DeadletterMessagesCount = deadLetterMessageCount; single.TransferMessagesCount = queue.MessageCountDetails.TransferMessageCount; single.Updated = DateTime.UtcNow; await elasticService.PutAsync(elasticIndex, single); } } if (alertList.Count > 0) { var correlations = await alertsService.ProcessAlertsAsync(alertList); foreach (var correlationId in correlations) { log.LogInformation($"Mail message '{correlationId}' was added to queue"); } } } catch (Exception exception) { log.LogError($"Error in {nameof(ServiceBusMonitorTimerFunction)}, details: {exception.Message}"); throw; } }
public SearchController(IElasticService elasticService) { _elasticService = elasticService; }
public LocationSearchController(ILogger <LocationSearchController> logger, IElasticService elasticService) { _logger = logger; _elasticService = elasticService; }
public SectorsManager(ISectorsRepository sectorsRepository, IElasticService elasticService) : base(sectorsRepository) { _sectorsRepository = sectorsRepository; _elasticService = elasticService; }
public PrescriptionBarcodeDetailesController(IPrescriptionBarcodeDetailesService prescriptionBarcodeDetailesService, IElasticService elasticService) { _prescriptionBarcodeDetailesService = prescriptionBarcodeDetailesService; this._elasticService = elasticService; }
public ImportController(IElasticService <int, Artist> artistService, IElasticService <int, Music> musicService) { this.artistService = artistService; this.musicService = musicService; }