main
 1using System.Collections.Generic;
 2using MoMoney.DTO;
 3using MoMoney.Presentation.Core;
 4using MoMoney.Presentation.Views;
 5using MoMoney.Service.Contracts.Application;
 6
 7namespace MoMoney.Presentation.Presenters
 8{
 9    public interface IViewIncomeHistoryPresenter : IContentPresenter
10    {
11    }
12
13    public class ViewIncomeHistoryPresenter : ContentPresenter<IViewIncomeHistory>, IViewIncomeHistoryPresenter
14    {
15        readonly ICommandPump pump;
16
17        public ViewIncomeHistoryPresenter(IViewIncomeHistory view, ICommandPump pump) : base(view)
18        {
19            this.pump = pump;
20        }
21
22        public override void run()
23        {
24            view.attach_to(this);
25            pump.run<IEnumerable<IncomeInformationDTO>, IGetAllIncomeQuery>(view);
26        }
27    }
28}