Exemple #1
0
        public override async Task Connect()
        {
            await Task.Run(() =>
            {
                Bus = RabbitHutch.CreateBus(Context.Connection);
                Bus.SubscribeAsync <HeartBeat>(Process.GetCurrentProcess().ProcessName, new HeartBeatHandler(Logger).Execute);

                var application = new ApplicationResponder(Logger, Server);
                Bus.RespondAsync <ListApplicationRequest, ListApplicationResponse>(application.GetApplications);
                Bus.RespondAsync <GetApplicationByIdRequest, GetApplicationByIdResponse>(application.GetApplicationById);
                Bus.RespondAsync <RegisterApplicationRequest, CreateApplicationResponse>(application.Register);
                Bus.RespondAsync <UpdateApplicationRequest, UpdateApplicationResponse>(application.Update);
                Bus.RespondAsync <DeleteApplicationRequest, DeleteApplicationResponse>(application.Delete);
            });
        }
Exemple #2
0
 public Application(ApplicationResponder responder)
 {
     Responder = responder;
 }
Exemple #3
0
 public Application(ApplicationResponder responder)
 {
     Responder = responder;
 }
Exemple #4
0
 public Application(IApplication innerApplication, ApplicationResponder responder)
 {
     InnerApplication = innerApplication;
     Responder = responder;
 }
Exemple #5
0
 public Application(IApplication innerApplication, ApplicationResponder responder)
 {
     InnerApplication = innerApplication;
     Responder        = responder;
 }