using Admin.Classes.Models; using Admin.Interfaces.Commands; using Admin.Interfaces.ModelBuilders; using Admin.Models.Payment; using log4net; using System; using Unity; namespace Admin.Controllers { public class PaymentControllerDependencies : BaseControllerDependencies, IPaymentControllerDependencies { public PaymentControllerDependencies(ILog log, IModelBuilder indexViewModelBuilder, [Dependency("Add")] IModelCommand addCommand, [Dependency("Remove")] IModelCommand removeCommand, [Dependency("EmptyBasket")] IModelCommand emptyBasketCommand, [Dependency("CheckAddress")] IModelCommand checkAddressCommand, [Dependency("CreatePayments")] IModelCommand createPaymentsCommand, [Dependency("SetAddress")] IModelCommand setAddressCommand, IModelCommand processPaymentCommand) : base(log) { IndexViewModelBuilder = indexViewModelBuilder ?? throw new ArgumentNullException("indexViewModelBuilder"); AddCommand = addCommand ?? throw new ArgumentNullException("addCommand"); RemoveCommand = removeCommand ?? throw new ArgumentNullException("removeCommand"); EmptyBasketCommand = emptyBasketCommand ?? throw new ArgumentNullException("emptyBasketCommand"); CheckAddressCommand = checkAddressCommand ?? throw new ArgumentNullException("checkAddressCommand"); CreatePaymentsCommand = createPaymentsCommand ?? throw new ArgumentNullException("createPaymentsCommand"); SetAddressCommand = setAddressCommand ?? throw new ArgumentNullException("setAddressCommand"); ProcessPaymentCommand = processPaymentCommand ?? throw new ArgumentNullException("processPaymentCommand"); } public IModelBuilder IndexViewModelBuilder { get; private set; } public IModelCommand AddCommand { get; private set; } public IModelCommand RemoveCommand { get; private set; } public IModelCommand EmptyBasketCommand { get; private set; } public IModelCommand CheckAddressCommand { get; private set; } public IModelCommand CreatePaymentsCommand { get; private set; } public IModelCommand SetAddressCommand { get; private set; } public IModelCommand ProcessPaymentCommand { get; private set; } } }