public static void Main(string[] args) { Thread.Sleep(TimeSpan.FromSeconds(60)); IUnitOfWork unitOfWork = new UnitOfWork(); ICassandraService cassandraService = new CassandraService(unitOfWork); IMessageService messageService = new MessageService(unitOfWork); INotifyService notify = new NotifyService(unitOfWork, messageService, cassandraService); IConsumerService consumer = new ConsumerService(unitOfWork, notify); consumer.Consume(); CreateHostBuilder(args).Build().Run(); }
static async Task Main(string[] args) { Thread.Sleep(TimeSpan.FromSeconds(60)); IAnalyticsService analyticsService = new AnalyticsService(); IUnitOfWork unitOfWork = new UnitOfWork(); IMessageService messageService = new MessageService(unitOfWork); ICassandraService cassandraService = new CassandraService(unitOfWork); IConsumeService consumeService = new ConsumeService(unitOfWork, analyticsService, cassandraService, messageService); consumeService.Consume(); Console.WriteLine("Press [Exit] to exit."); string sequence = Console.ReadLine(); while (sequence != "Exit") { sequence = Console.ReadLine(); } }