Beispiel #1
0
 public ArticlesController(
     IArticleRepository repository,
     IArticleFactory factory)
 {
     _repository = repository;
     _factory    = factory;
 }
Beispiel #2
0
 private MusicShopEngine()
 {
     this.musicShopFactory = new MusicShopFactory();
     this.articleFactory = new ArticleFactory();
     this.musicShops = new Dictionary<string, IMusicShop>();
     this.articles = new Dictionary<string, IArticle>();
     this.userInterface = new ConsoleInterface();
 }
 private MusicShopEngine()
 {
     this.musicShopFactory = new MusicShopFactory();
     this.articleFactory   = new ArticleFactory();
     this.musicShops       = new Dictionary <string, IMusicShop>();
     this.articles         = new Dictionary <string, IArticle>();
     this.userInterface    = new ConsoleInterface();
 }
Beispiel #4
0
 public ArticleRepository(
     IArticleFactory articleFactory,
     IArticleEntityFactory entityFactory,
     IContextFactory <Data.Contexts.FinancialContext> contextFactory
     )
 {
     _articleFactory = articleFactory;
     _entityFactory  = entityFactory;
     _contextFactory = contextFactory;
 }
Beispiel #5
0
 public CreateArticleCommandHandler(
     ICurrentUser currentUser,
     IJournalistRepository journalistRepository,
     IArticleRepository articleRepository,
     IArticleFactory articleFactory)
 {
     this.currentUser          = currentUser;
     this.journalistRepository = journalistRepository;
     this.articleRepository    = articleRepository;
     this.articleFactory       = articleFactory;
 }
Beispiel #6
0
 public ArticlesController(KnowledgeBaseContext context, IHttpContextAccessor httpContextAccessor, IArticleFactory articleFactory, IArticleRepository articleRepository, IUserRepository userRepository, IActivityRepository activityRepository, KbVaultLuceneHelper lucene, KbVaultAttachmentHelper attachmentHelper)
 {
     _context             = context;
     _httpContextAccessor = httpContextAccessor;
     _articleFactory      = articleFactory;
     _articleRepository   = articleRepository;
     _userRepository      = userRepository;
     _activityRepository  = activityRepository;
     _lucene = lucene;
     this.attachmentHelper = attachmentHelper;
 }
Beispiel #7
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="LikeUseCase" /> class.
 /// </summary>
 /// <param name="articleRepository">Article Repository.</param>
 /// <param name="unitOfWork">Unit Of Work.</param>
 /// <param name="userService"></param>
 /// <param name="articleFactory"></param>
 public LikeUseCase(
     IArticleRepository articleRepository,
     IUnitOfWork unitOfWork,
     IUserService userService,
     IArticleFactory articleFactory)
 {
     this._articleRepository = articleRepository;
     this._unitOfWork        = unitOfWork;
     this._articleFactory    = articleFactory;
     this._userService       = userService;
     this._outputPort        = new LikePresenter();
 }
        internal DerDieDasData(string dataToParse, IArticleFactory articleFactory)
        {
            ParamValidator.EnsureParametersAreValid(new NullValidatorWithValue<IArticleFactory>(() => articleFactory, articleFactory));
            ParamValidator.EnsureParametersAreValid(new StringValidatorWithValue(() => dataToParse, dataToParse));

            var dataParsed = dataToParse.Split(new[]{','}, StringSplitOptions.RemoveEmptyEntries);
            if (dataParsed.Length != 3)
                throw new InvalidDataException(string.Format("Invalid data to parse: {0}", dataToParse));

            _article = articleFactory.CreateArticle(dataParsed[0]);
            _verb = dataParsed[1].Trim();
            _verbPlural = dataParsed[2].Trim();
        }
        public ArticleService(ITravelGuideContext context, IArticleFactory articleFactory, IArticleCommentFactory commentFactory)
        {
            if (context == null)
            {
                throw new ArgumentNullException("Passed DdContext cannot be null!");
            }

            if (articleFactory == null)
            {
                throw new ArgumentNullException("Passed factory cannot be null!");
            }

            if (commentFactory == null)
            {
                throw new ArgumentNullException("Passed factory cannot be null!");
            }

            this.context        = context;
            this.articleFactory = articleFactory;
            this.commentFactory = commentFactory;
        }
 public ExtendedArticleService(ITravelGuideContext context, IArticleFactory articleFactory, IArticleCommentFactory commentFactory)
     : base(context, articleFactory, commentFactory)
 {
 }
Beispiel #11
0
 public ArticleServiceMock(ITravelGuideContext context, IArticleFactory articleFactory, IArticleCommentFactory commentFactory)
     : base(context, articleFactory, commentFactory)
 {
 }
 public CreateArticleCommandHandler(IMediator mediator, IArticleFactory articleFactory)
 {
     Mediator       = mediator;
     ArticleFactory = articleFactory;
 }
 public CreateArticleCommand(IArticleRepositoryFacade repositories, IArticleFactory factory)
 {
     this._repositories = repositories;
     this._factory      = factory;
 }