예제 #1
0
 /// <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;
 }
예제 #2
0
 /// <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;
 }
예제 #3
0
 /// <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;
 }
예제 #4
0
 /// <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;
 }
예제 #5
0
 /// <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;
 }
예제 #6
0
 /// <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;
 }
예제 #7
0
 /// <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;
 }