25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using DotNetCore.CAP.Internal;
- using Microsoft.Extensions.DependencyInjection;
- using Microsoft.Extensions.Logging;
-
- namespace Sample.ConsoleApp
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- var container = new ServiceCollection();
-
- container.AddLogging(x => x.AddConsole());
- container.AddCap(x =>
- {
- //console app does not support dashboard
-
- x.UseMySql("<ConnectionString>");
- x.UseRabbitMQ(z =>
- {
- z.HostName = "192.168.3.57";
- z.UserName = "user";
- z.Password = "wJ0p5gSs17";
- });
- });
-
- container.AddSingleton<EventSubscriber>();
-
- var sp = container.BuildServiceProvider();
-
- sp.GetService<IBootstrapper>().BootstrapAsync();
-
- Console.ReadLine();
- }
- }
- }
|