using EntrustSettle.Common; using EntrustSettle.EventBus.EventHandling; using EntrustSettle.IServices; using Microsoft.Extensions.Logging; using System; using System.Threading.Tasks; namespace EntrustSettle.EventBus { public class BlogQueryIntegrationEventHandler : IIntegrationEventHandler { private readonly ILogger _logger; public BlogQueryIntegrationEventHandler(ILogger logger) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } public async Task Handle(BlogQueryIntegrationEvent @event) { _logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, "EntrustSettle", @event); ConsoleHelper.WriteSuccessLine($"----- Handling integration event: {@event.Id} at EntrustSettle - ({@event})"); await Task.Delay(100); //await _blogArticleServices.QueryById(@event.BlogId.ToString()); } } }