/// <summary> /// Initialises a new instance of the <see cref="AccountListProjection"/> class. /// </summary> /// <param name="accountListRepository">Account list repository to use</param> /// <param name="accountListItemRepository">Account list item repository to use</param> /// <param name="commandBus">Command bus</param> public AccountListProjection( AccountListRepository accountListRepository, AccountListItemRepository accountListItemRepository, ICommandBus commandBus) { this.accountListRepository = accountListRepository; this.accountListItemRepository = accountListItemRepository; this.commandBus = commandBus; }
/// <summary> /// Initialises a new instance of the <see cref="BudgetListProjection"/> class. /// </summary> /// <param name="budgetListRepository">Budget list repository to use</param> /// <param name="budgetListItemRepository">Budget list item repository to use</param> /// <param name="accountListRepository">Account list repository to use</param> /// <param name="accountListItemRepository">Account list item repository to use</param> /// <param name="commandBus">Command bus</param> /// <param name="readStoreResetBroadcast">Read store reset broadcast</param> public BudgetListProjection( BudgetListRepository budgetListRepository, BudgetListItemRepository budgetListItemRepository, AccountListRepository accountListRepository, AccountListItemRepository accountListItemRepository, ICommandBus commandBus, IReadStoreResetBroadcast readStoreResetBroadcast) { this.budgetListRepository = budgetListRepository; this.budgetListItemRepository = budgetListItemRepository; this.accountListRepository = accountListRepository; this.accountListItemRepository = accountListItemRepository; this.commandBus = commandBus; readStoreResetBroadcast.ReadStoreReset += (sender, args) => { this.Init(budgetListRepository, budgetListItemRepository, accountListRepository, commandBus); }; this.Init(budgetListRepository, budgetListItemRepository, accountListRepository, commandBus); }