/// <summary> /// Внедрение конструктора. Пример использования паттернов Dependecy Injection /// </summary> /// <param name="repository"></param> public EventService(IEventRepository _eventRepository, Filtering.IFilterFactory<Models.Event> filterFactory) { ///Guard Condition if (_eventRepository == null) throw new ArgumentNullException("Repository is null!"); if (filterFactory == null) throw new ArgumentNullException("Filtering Factory is null!"); this.eventRepository = _eventRepository; this.filterFactory = filterFactory; }
/// <summary> /// Внедрение конструктора. Пример использования паттернов Dependecy Injection /// </summary> /// <param name="repository"></param> public CommentService(ICommentsRepository _commentsRepository, Filtering.IFilterFactory<Models.Comment> filterFactory) { ///Guard Condition if (_commentsRepository == null) throw new ArgumentNullException("Repository is null!"); if (filterFactory == null) throw new ArgumentNullException("Filtering Factory is null!"); this.commentsRepository = _commentsRepository; this.filterFactory = filterFactory; }
/// <summary> /// Внедрение конструктора. Пример использования паттернов Dependecy Injection /// </summary> /// <param name="repository"></param> public AccountService(Models.Repositories.IAccountRepository repository, Filtering.IFilterFactory<Models.User> filterFactory) { ///Guard Condition if (repository == null) throw new ArgumentNullException("Repository is null!"); if (filterFactory == null) throw new ArgumentNullException("Filtering Factory is null!"); this.repository = repository; this.filterFactory = filterFactory; }
/// <summary> /// Внедрение конструктора. Пример использования паттернов Dependecy Injection /// </summary> /// <param name="repository"></param> public OrderService(IOrderRepository _orderRepository, Filtering.IFilterFactory<Models.Order> filterFactory) { ///Guard Condition if (_orderRepository == null) throw new ArgumentNullException("Repository is null!"); if (filterFactory == null) throw new ArgumentNullException("Filtering Factory is null!"); this.orderRepository = _orderRepository; this.filterFactory = filterFactory; }
/// <summary> /// Внедрение конструктора. Пример использования паттернов Dependecy Injection /// </summary> /// <param name="repository"></param> public CategoryService(Models.Repositories.ICategoryRepository repository, Filtering.IFilterFactory<Models.Category> filterFactory) { ///Guard Condition if (repository == null) throw new ArgumentNullException("Repository is null!"); if (filterFactory == null) throw new ArgumentNullException("Filtering Factory is null!"); this.categoryRepository = repository; this.filterFactory = filterFactory; }
/// <summary> /// Внедрение конструктора. Пример использования паттернов Dependecy Injection /// </summary> /// <param name="partnerRepository"></param> public PatherService(IPartnerRepository partnerRepository, IAccountRepository accountRepository, ICategoryRepository categoryRepository, Filtering.IFilterFactory<Models.Partner> filterFactory) { ///Guard Condition if (partnerRepository == null) throw new ArgumentNullException("Repository is null!"); if (filterFactory == null) throw new ArgumentNullException("Filtering Factory is null!"); this.partnerRepository = partnerRepository; this.accountRepository = accountRepository; this.categoryRepository = categoryRepository; this.filterFactory = filterFactory; }
/// <summary> /// Внедрение конструктора. Пример использования паттернов Dependecy Injection /// </summary> /// <param name="repository"></param> public ProductService(IProductRepository repository, IAccountRepository repositoryAccounts, IPartnerRepository repositoryPartners, ICategoryRepository categoryRepository, Filtering.IFilterFactory<Models.Product> filterFactory) { ///Guard Condition if (repository == null) throw new ArgumentNullException("Product repository is null!"); if (repositoryPartners == null) throw new ArgumentNullException("Partner repository is null!"); if (filterFactory == null) throw new ArgumentNullException("Filtering Factory is null!"); this.productRepository = repository; this.accountRepository = repositoryAccounts; this.partnerRepository = repositoryPartners; this.categoryRepository = categoryRepository; this.filterFactory = filterFactory; }