Beispiel #1
0
        public override async Task <TFormResponse> ExecuteAsync(
            PageCallMessage <TPage, TPageGet, TMessage, TMessageResponse, TFormResponse> message)
        {
            var page = await executeHandler.ExecuteAsync(message.PageGet);

            //var form = message.Member.Compile()(page);
            var form            = message.PageMember(page);
            var messageResponse = await executeHandler.ExecuteAsync(message.Message);

            return(form.Translate(message.Message, messageResponse));
        }
Beispiel #2
0
        public override async Task <TPageResponse> ExecuteAsync(
            PageCall <TPageGet, TMessage, TMessageResponse, TPageResponse> message)
        {
            var page = await executeHandler.ExecuteAsync(message.PageMessage);

            var fieldInfo       = page.GetType().GetField(message.MemberName);
            var pageCall        = (PageCall <TPageGet, TMessage, TMessageResponse, TPageResponse>)fieldInfo.InvokeGetter(page);
            var messageResponse = await executeHandler.ExecuteAsync(message.Message);

            return(pageCall.Translate(message.Message, messageResponse));
        }
Beispiel #3
0
        public override async Task <T> ExecuteAsync(AsyncCall <TPageQuery, T> asyncCallMessage)
        {
            Type type     = mapper.GetIntermediateType <TPageQuery, T>();
            var  message  = (IMessage)mapper.Map(type, asyncCallMessage.PageQuery);
            var  response = await executeHandler.ExecuteAsync(message);

            return(mapper.Map <T>(message, response));
        }
Beispiel #4
0
        public override async Task <Annonces_Id_Page> ExecuteAsync(Annonces_Id_Page_GET message)
        {
            var data = await messageBus.ExecuteAsync(new Annonces_Id_GET()
            {
                Id = message.Id
            });

            var response = new Annonces_Id_Page()
            {
                Data = data
            };

            return(response);
        }
        public override async Task <Vendeur_Annonces_Page> ExecuteAsync(Vendeur_Annonces_Page_GET message)
        {
            var annonces = await executeHandler.ExecuteAsync(new Vendeur_Annonces_GET());

            var page = new Vendeur_Annonces_Page();

            page.Annonces = annonces.Select(x => new Vendeur_Annonces_PageItem()
            {
                Data = x,
                Lien = new Vendeur_Annonces_Id_Page_GET()
                {
                    Id = x.Id
                }
            }).ToArray();

            return(page);
        }
Beispiel #6
0
        public override async Task <TModel> ExecuteAsync(AsyncCall <TQuery, TModel> AsyncCallMessage)
        {
            var response = await executeHandler.ExecuteAsync(AsyncCallMessage.Message);

            return(mapper.Map <TModel>(AsyncCallMessage.Message, response));
        }
Beispiel #7
0
 public override async Task <TMessageResponse> ExecuteAsync(
     Call <TMessage, TMessageResponse> message)
 {
     return(await executeHandler.ExecuteAsync(message.Message));
 }
        public override async Task <T> ExecuteAsync(Form <TCommand, T> message)
        {
            var response = await executeHandler.ExecuteAsync(message.Command);

            return(mapper.Map <T>(message.Command, response));
        }