public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToCommand <CreateUser>() .Build().Run(); }
public static void Initialize() { if (_configured) { return; } var builder = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) // .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddEnvironmentVariables() .SetBasePath(Directory.GetCurrentDirectory()); Configuration = builder.Build(); LifetimeScope = GetLifetimeScope(); ServiceHost .Create <Program>() .UseAutofac(LifetimeScope) .UseRabbitMq(queueName: typeof(Program).Namespace) .SubscribeToCommand <SpawnWarden>() .SubscribeToCommand <StartWarden>() .SubscribeToCommand <StopWarden>() .SubscribeToCommand <PauseWarden>() .SubscribeToCommand <PingWarden>() .SubscribeToCommand <KillWarden>() .Build() .Run(); _configured = true; }
public static void Main(string[] args) { ServiceHost.Create(new DefaultContainerAdapter()) .Logging(x => x.ColoredConsole()) .ServiceFinder(x => x.ServicesInAssemblyOfType <Program>()) .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseMassTransit() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create(new StructureMapContainerAdapter()) .Logging(x => x.File("log.txt")) .ServiceFinder(x => x.ServicesInAssemblyOfType <Program>()) .Run(); }
public async static Task MainAsync(string[] args) { await ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToEvent <ItemCreated2>() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToEvent <ActivityCreated>() .Build() .Run(); }
public static void Main(string[] args) { LoggerUtil.InitApp(ServiceHost.Create <Startup>(args).UseRabbitMq() .SubscribeToEvent <PaymentAccepted>() .SubscribeToEvent <PaymentRejected>() .Build().Run); //new GrpcServer("localhost", 50051, Auditservice.AuditService.BindService(new AuditServiceImpl())).InitServer(); }
public static void Main(string[] args) { var builder = ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToCommand <CreateAction>(); builder.Build().Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseMessageBus() .AddAssemblySubscriptions() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToCommand <CreateActivity>() // Subscribe service to commands. .Build() .Run(); }
public static void Main(string[] args) { // Default web host builder //BuildWebHost(args).Run(); ServiceHost.Create <Startup>() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args, "http://*:5052") .UseRabbitMq() .SubscribeToCommand <CreateActivity>() .Build() .Run(); }
public static async Task Main(string[] args) { await ServiceHost.Create <Startup>(args) .UseRabbitMQ() .SubscribeToCommand <CreateActivity>() .Build() .Run(); }
public static async Task Main(string[] args) { await ServiceHost.Create <Startup>(args) .UseQueueImplementation <RabbitQueueMessageBus>() .SubscribeToCommand <CreateActivity>() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToEvent <DomainNotification>() .Build() .Run(); }
public static async Task Main(string[] args) { await ServiceHost.Create <Startup>(args) .UserRabbitMq() .SubscribeToEvent <ActivityCreated>() .Build() .RunAsync(); }
public static void Main(string[] args) { ServiceHost.Create<Startup>(args) .UseAutofac(Startup.LifetimeScope) .UseRabbitMq(queueName: typeof(Program).Namespace) .SubscribeToCommand<CreateUser>(exchangeName: "Frutinet.Services.Users", routingKey: "user.create") .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .RegisterEvents() // .SubscribeToEvent<UserCreated>() .Build() .Run(); }
public static void Main(string[] args) { //service host responsible for consuming commands and producing events ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToEvent <ActivityCreated>() .Build() .Run(); }
/* * * public static void Main(string[] args) * { * CreateHostBuilder(args).Build().Run(); * } * * public static IHostBuilder CreateHostBuilder(string[] args) => * Host.CreateDefaultBuilder(args) * .ConfigureWebHostDefaults(webBuilder => * { * webBuilder.UseStartup<Startup>(); * }); */ #endregion public static void Main(string[] args) { ServiceHost .Create <Startup>(args) //returns service host .UseRabbitMq() //return bus builder .SubscribeToCommand <TestMessagingCommand>() //use ioc to create instance of the handler and tell the bus to handle the coommands with that hadker .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubcribeToEvent <UserAuthenticated>() .SubcribeToEvent <UserCreated>() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToEvent <PaymentProcessed>() .SubscribeToEvent <PaymentFailed>() .Build() .Run(); }
public static void Main(string[] args) { //CreateHostBuilder(args).Build().Run(); ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToEvent <ActivityCreated>() // Subscribe API to events. .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToCommand <ActivityCreated>() .Build() .Run(); //CreateWebHostBuilder(args).Build().Run(); }
public static async Task Main(string[] args) { var serviceHost = ServiceHost.Create <Startup>(args) .UseRabbitMq(); await serviceHost.SubscribeToRcp <LoginRequest, LoginResponse>(); serviceHost.Build().Run(); }
public static void Main(string[] args) { //CreateWebHostBuilder(args).Build().Run(); ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToEvent <UsuarioCreatedEvent>() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() .SubscribeToCommand <ProcessPayment>() .SubscribeToEvent <UserCreated>() .Build() .Run(); }
public static void Main(string[] args) { ServiceHost.Create <Startup>(args) .UseRabbitMq() //.SubscribeToEvent<PushMessageCreated>() //.SubscribeToEvent<CreateActivityRejected>() .Build() .Run(); }