public void SetUp()
 {
     blogRP = MockRepository.GenerateMock<IBlogRepository>();
     postRP = MockRepository.GenerateMock<IPostRepository>();
     userRP = MockRepository.GenerateMock<IUserRepository>();
     friendlyUrlGen = MockRepository.GenerateMock<IFriendlyUrlGenerator>();
 }
Example #2
0
        public PostService(IPostRepository repository)
        {
            if (repository == null)
                throw new ArgumentNullException("repository cannot be null");

            postRepository = repository;
        }
 public MotherboardsController()
     : base()
 {
     motherboardRepository = new MotherboardRepository();
     postRepository = new PostRepository();
     service = new MotherboardService(motherboardRepository, postRepository);
 }
 public ForumIdentityService(IForumRepository forumRepository, IDiscussionRepository discussionRepository,
     IPostRepository postRepository)
 {
     this._forumRepository = forumRepository;
     this._discussionRepository = discussionRepository;
     this._postRepository = postRepository;
 }
Example #5
0
 public AdminManager()
 {
     _postRepo = new Factory().PostRepository();
     _pageRepo = new Factory().PageRepository();
     _categoryRepo = new Factory().CategoryRepository();
     _tagRepo = new Factory().TagRepository();
 }
Example #6
0
        public CommentService(IUnitOfWork unitOfWork, ICommentRepository commentRepository, IPostRepository post)
        {
            this.commentRepository = commentRepository;
            this.postRepository = post;
            this.unitOfWork = unitOfWork;

        }
Example #7
0
        public PostsController(
			IUnitOfWork unitOfWork,
			IPostRepository postRepository)
        {
            _unitOfWork = unitOfWork;
            _postRepository = postRepository;
        }
 public CommentServices(ICommentRepository commentRepository, IPostRepository postRepository, UserServices userServices, AppConfiguration config)
 {
     this.commentRepository = commentRepository;
     this.config = config;
     this.userServices = userServices;
     this.postRepository = postRepository;
 }
Example #9
0
 public PostService(ISettingsService settingsService, IRoleService roleService, IPostRepository postRepository, ITopicRepository topicRepository)
 {
     this._postRepository = postRepository;
     this._topicRepository = topicRepository;
     this._roleService = roleService;
     this._settingsService = settingsService;
 }
 public HomeController(ICalendarRepository repoCalendar, IPostRepository repoNewsItem,
     ILeaderRepository repoLeader)
 {
     _repoCalendar = repoCalendar;
     _repoNewsItem = repoNewsItem;
     _repoLeader = repoLeader;
 }
 public PostApplicationService(IPostRepository postRepository, IForumRepository forumRepository,
     ICollaboratorService collaboratorService)
 {
     this._postRepository = postRepository;
     this._forumRepository = forumRepository;
     this._collaboratorService = collaboratorService;
 }
Example #12
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="membershipRepository"> </param>
 /// <param name="settingsRepository"> </param>
 /// <param name="emailService"> </param>
 /// <param name="localizationService"> </param>
 /// <param name="activityService"> </param>
 /// <param name="privateMessageService"> </param>
 /// <param name="membershipUserPointsService"> </param>
 /// <param name="topicNotificationService"> </param>
 /// <param name="voteService"> </param>
 /// <param name="badgeService"> </param>
 /// <param name="categoryNotificationService"> </param>
 /// <param name="loggingService"></param>
 /// <param name="uploadedFileService"></param>
 /// <param name="postRepository"></param>
 /// <param name="pollVoteRepository"></param>
 /// <param name="pollAnswerRepository"></param>
 /// <param name="pollRepository"></param>
 /// <param name="topicRepository"></param>
 /// <param name="favouriteRepository"></param>
 /// <param name="categoryService"></param>
 public MembershipService(IMembershipRepository membershipRepository, ISettingsRepository settingsRepository,
     IEmailService emailService, ILocalizationService localizationService, IActivityService activityService,
     IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService,
     ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService,
     ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService,
     IPostRepository postRepository, IPollVoteRepository pollVoteRepository, IPollAnswerRepository pollAnswerRepository,
     IPollRepository pollRepository, ITopicRepository topicRepository, IFavouriteRepository favouriteRepository,
     ICategoryService categoryService)
 {
     _membershipRepository = membershipRepository;
     _settingsRepository = settingsRepository;
     _emailService = emailService;
     _localizationService = localizationService;
     _activityService = activityService;
     _privateMessageService = privateMessageService;
     _membershipUserPointsService = membershipUserPointsService;
     _topicNotificationService = topicNotificationService;
     _voteService = voteService;
     _badgeService = badgeService;
     _categoryNotificationService = categoryNotificationService;
     _loggingService = loggingService;
     _uploadedFileService = uploadedFileService;
     _postRepository = postRepository;
     _pollVoteRepository = pollVoteRepository;
     _pollAnswerRepository = pollAnswerRepository;
     _pollRepository = pollRepository;
     _topicRepository = topicRepository;
     _favouriteRepository = favouriteRepository;
     _categoryService = categoryService;
 }
 public void SetUp()
 {
     TestData.Init();
     _repository = MockRepository.GenerateStub<IPostRepository>();
     _service = new SyndicationService(_repository);
     _repository.Stub(m => m.FindAll()).Return(new[] {TestData.PublishedPost});
     _feed = _service.GetPostsAsSyndicationFeed(new Uri("http://test.com/testrss"));
 }
        public HomeController(IDiscussionRepository<Discussion> discussionRepository,
            IPostRepository<Post> postRepository )
        {
            _discussionRepository = discussionRepository;
            _postRepository = postRepository;

            Mapper.AddProfile<HomeMappingProfile>();
        }
Example #15
0
 public PostService(IPostRepository postRepository,
     ICommentRepository commentRepository,
     ICategoryRepository categoryRepository)
 {
     this.postRepository = postRepository;
     this.commentRepository = commentRepository;
     this.categoryRepository = categoryRepository;
 }
Example #16
0
 public HomeController(IPostRepository postRepository, 
                       IEmailer messagingService,
                       IViewMapper viewMapper)
     : base(postRepository, viewMapper)
 {
     _viewMapper = viewMapper;
     MessagingService = messagingService;
 }
        public CommentsController(IApplicationDbContext applicationDbContext, IPostRepository postRepository,
            IUserRepository userRepository)
            : base(applicationDbContext)
        {
            _postRepository = postRepository;

            _userRepository = userRepository;
        }
 /*
  *  Name: UserRepository
  *  Description: Constructor to allow ease of mocking
  *  Arguments: Implementations of the context,security, and repositories.
  */
 public UserRepository(ISocialContext sc, IWebSecurity webSecurity
     , IPostRepository postrepo, IGroupRepository grouprepo)
 {
     db = sc;
     WebSecurity = webSecurity;
     pr = postrepo;
     gr = grouprepo;
 }
Example #19
0
        public HomeController(IBadgeRepository ibadgeRepository, IPostRepository ipostRepository
				, ITagRepository itagRepository, IUserRepository iuserRepository)
        {
            this.ibadgeRepository = ibadgeRepository;
            this.ipostRepository = ipostRepository;
            this.itagRepository = itagRepository;
            this.iuserRepository = iuserRepository;
        }
Example #20
0
 public DomainService(IRepositoryContext repositoryContext,
                      IPostRepository postRepository,
                      ICommentRepository commentRepository) 
 {
     this.repositoryContext = repositoryContext;
     this.postRepository = postRepository;
     this.commentRepository = commentRepository;
 }
Example #21
0
        public HomeController(IPostRepository postRepository)
        {
            _posts = postRepository;

            _userRepository = new UserRepository();
            _roleRepository = new RoleRepository();
            _users = new UserService(ModelState, _userRepository, _roleRepository);
        }
        public PostsController(IPostRepository postRepository, ITagRepository tagRepository, ISettingsProvider settingsProvider)
        {
            _postRepository = postRepository;
            _tagRepository = tagRepository;
            _settingsProvider = settingsProvider;

            PageSize = _settingsProvider.GetSettings().PageSize;
        }
Example #23
0
 public TopicService(IMembershipUserPointsService membershipUserPointsService,
     ISettingsService settingsService, ITopicRepository topicRepository, IPostRepository postRepository, ITopicNotificationService topicNotificationService)
 {
     _membershipUserPointsService = membershipUserPointsService;
     _settingsService = settingsService;
     _topicRepository = topicRepository;
     _postRepository = postRepository;
     _topicNotificationService = topicNotificationService;
 }
Example #24
0
 private void DisposeCore()
 {
     _userRepository = null;
     _likeRepository = null;
     _pictureRepository = null;
     _postRepository = null;
     _externalLoginRepository = null;
     _dbContext.Dispose();
 }
Example #25
0
 public ContentService(IPostRepository postRepository, ICommentRepository commentRepository, ITagRepository tagRepository, ISiteSettingsService siteSettingsService, IMembershipService membershipService, HttpContextBase context)
 {
     _siteSettingsService = siteSettingsService;
     PostRepository = postRepository;
     CommentRepository = commentRepository;
     TagRepository = tagRepository;
     MembershipService = membershipService;
     Context = context;
 }
        public CategoryListViewComponent(IPostRepository repo)
        {
            if (repo == null)
            {
                throw new ArgumentNullException(nameof(repo));
            }

            this._repo = repo;
        }
Example #27
0
 public void SetUp()
 {
     _postTasks = MockRepository.GenerateMock<IPostTasks>();
     _userTasks = MockRepository.GenerateMock<IUserTasks>();
     _postEditDetailsMapper = MockRepository.GenerateMock<IPostEditDetailsMapper>();
     _postCreateDetailsMapper = MockRepository.GenerateMock<IPostCreateDetailsMapper>();
     _postRepository = MockRepository.GenerateMock<IPostRepository>();
     _controller = new PostController(_postTasks, _postRepository, _userTasks, _postCreateDetailsMapper, _postEditDetailsMapper);
 }
 public DiscussionApplicationService(IDiscussionRepository discussionRepository,
     ForumIdentityService forumIdentityService, IPostRepository postRepository,
     ICollaboratorService collaboratorService)
 {
     this._discussionRepository = discussionRepository;
     this._forumIdentityService = forumIdentityService;
     this._postRepository = postRepository;
     this._collaboratorService = collaboratorService;
 }
 public BlogEngineService(IPostRepository postRepo, 
                          ICommentRepository commentRepo,
                          ICategoryRepository categoryRepo, 
                          ILogger log)
 {
     postRepository = postRepo;
     commentRepository = commentRepo;
     categoryRepository = categoryRepo;
     postLogger = log;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultStartupInstaller" /> class. 
        /// </summary>
        /// <param name="blogRepository"></param>
        /// <param name="postRepository"></param>
        /// <param name="userRepository"></param>
        /// <param name="generator"></param>
        public DefaultStartupInstaller(IBlogRepository blogRepository,
		                               IPostRepository postRepository,
		                               IUserRepository userRepository,
		                               IFriendlyUrlGenerator generator)
        {
            this.blogRepository = blogRepository;
            this.postRepository = postRepository;
            this.userRepository = userRepository;
            this.generator = generator;
        }
Example #31
0
 public PostDeleteService(IPostRepository postRepository)
 {
     this.postRepository = postRepository;
 }
Example #32
0
 public PostController(IPostRepository postRespository, IMapper mapper)
 {
     _postRepository = postRespository;
     _mapper         = mapper;
 }
Example #33
0
 public UserWebController()
 {
     this.userRepository = new UserRepository(new ActivityDBEntities());
     this.likeRepository = new LikeRepository(new ActivityDBEntities());
     this.postRepository = new PostRepository(new ActivityDBEntities());
 }
 public PostController(IPostRepository repo, IMapper mapper, IUserRepository userRepository)
 {
     _repo           = repo;
     _mapper         = mapper;
     _userRepository = userRepository;
 }
Example #35
0
 public PostService(IPostRepository postRepository)
 {
     _postRepository = postRepository;
 }
 public MeController(ICommentRepository comment, IPostRepository post, Authenticate auth)
 {
     _comment = comment;
     _post    = post;
     _auth    = auth;
 }
 public PostController(IPostRepository repository, IUserRepository userRepository)
 {
     _repository = repository;
     _users      = userRepository;
 }
Example #38
0
 public ESController(IESSever eSSever, IPostRepository postRepository, IMapper mapper)
 {
     this.eSSever        = eSSever;
     this.postRepository = postRepository;
     this.mapper         = mapper;
 }
 public CommentController(ICommentRepository commentRepository, IPostRepository postRepository)
 {
     _commentRepository = commentRepository;
     _postRepository    = postRepository;
 }
Example #40
0
 public PostService(IMembershipUserPointsService membershipUserPointsService,
                    ISettingsService settingsService, IRoleService roleService, IPostRepository postRepository, ITopicRepository topicRepository,
                    ILocalizationService localizationService)
 {
     _postRepository              = postRepository;
     _topicRepository             = topicRepository;
     _roleService                 = roleService;
     _membershipUserPointsService = membershipUserPointsService;
     _settingsService             = settingsService;
     _localizationService         = localizationService;
 }
Example #41
0
 public HomeController()
 {
     postreposity = new PostRepository();
 }
Example #42
0
 public PostController(IPostRepository repo, IMapper mapper, DataContext context)
 {
     _mapper  = mapper;
     _repo    = repo;
     _context = context;
 }
Example #43
0
 public UserService(IBannedIpRepository bannedIpRepository, IPostRepository postRepository)
 {
     this.bannedIpRepository = bannedIpRepository;
     this.postRepository     = postRepository;
 }
        //private readonly BlogInDbContext _dbContext;

        public BlogService(IPostRepository postRepository)
        {
            //_dbContext = new BlogInDbContext();
            _postRepository = postRepository;
        }
 public NotificationService(INotificationRepository notificationRepo, IUserInformationRepository userInformationRepo, IMapper mapper, IPostRepository postRepo)
 {
     _notificationRepo    = notificationRepo;
     _userInformationRepo = userInformationRepo;
     _postRepo            = postRepo;
     _mapper = mapper;
 }
Example #46
0
 public AdminController(IPostRepository postRep, IHostingEnvironment hostingEnvironment)
 {
     _postRep = postRep;
     this.hostingEnvironment = hostingEnvironment;
 }
 public LatestPostsController(IPostRepository postRepository)
 {
     _postRepository = postRepository;
 }
Example #48
0
 //Khởi tạo service và truyền 2 đối tượng postRepository, unitOfWork và gán vào biến nội tại và có thể sử dụng các phương thức trong đó. Cơ ché dependersy injection
 public PostService(IPostRepository postRepository, IUnitOfWork unitOfWork)
 {
     this._postRepository = postRepository;
     this._unitOfWork     = unitOfWork;
 }
Example #49
0
        public TeamViewModel(IWindowService windowService, ITeamRepository teamRepository, IUserRepository userRepository, IPostRepository postRepository, ICommentRepository commentRepository, IMediator mediator)
        {
            this._windowService     = windowService;
            this._teamRepository    = teamRepository;
            this._userRepository    = userRepository;
            this._postRepository    = postRepository;
            this._commentRepository = commentRepository;
            this._mediator          = mediator;

            mediator.Register <TeamOpenDetailMessage>(TeamOpenDetail);

            MemberSelectedCommand = new RelayCommand <UserListModel>(MemberSelected);
            UserSelectedCommand   = new RelayCommand <UserListModel>(UserSelected);

            AddTeamMemberCommand    = new RelayCommand(AddTeamMember);
            RemoveTeamMemberCommand = new RelayCommand(RemoveTeamMember);

            RenameTeamCommand = new RelayCommand(RenameTeam);
            DeleteTeamCommand = new RelayCommand(DeleteTeam);

            this.CloseWindowCommand = new RelayCommand <Window>(this.CloseWindow);
        }
Example #50
0
 public LastReadService(ILastReadRepository lastReadRepository, IPostRepository postRepository)
 {
     _lastReadRepository = lastReadRepository;
     _postRepository     = postRepository;
 }
Example #51
0
 public PostService(IPostRepository repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher, ICacheManager <SearchResult <PostDto> > cacheManager, ICacheManager <Dictionary <string, int> > tagCacheManager) : base(repository, searchEngine, searcher)
 {
     _cacheManager    = cacheManager;
     _tagCacheManager = tagCacheManager;
 }
Example #52
0
 public PostsController(IApplicationDbContext applicationDbContext, IPostRepository postRepository)
     : base(applicationDbContext)
 {
     _postRepository = postRepository;
 }
 public DeletePostHandler(IPostRepository postRepository)
 {
     _postRepository = postRepository;
 }
Example #54
0
 public ApiPostRequestModelValidator(IPostRepository postRepository)
     : base(postRepository)
 {
 }
Example #55
0
 public UserWebController(IUserRepository userRepository, ILikeRepository likeRepository, IPostRepository postRepository)
 {
     this.userRepository = userRepository;
     this.likeRepository = likeRepository;
     this.postRepository = postRepository;
 }
Example #56
0
 public ActivationService(IUserRepository userRepository, IPostRepository postRepository)
 {
     _userRepository = userRepository;
     _postRepository = postRepository;
 }
Example #57
0
 public OrdersController(ILoggerManager logger, IOrderRepository orderRepository, IPostRepository postRepository, IMapper mapper)
 {
     this.logger          = logger;
     this.orderRepository = orderRepository;
     this.postRepository  = postRepository;
     this.mapper          = mapper;
 }
Example #58
0
 public PostService(IPostRepository postRepository, IPostMapper postMapper, ILogger <PostService> logger)
 {
     _postRepository = postRepository;
     _postMapper     = postMapper;
     _logger         = logger;
 }
 public PostController(IPostRepository postRepository)
 {
     _postRepository = postRepository;
 }
Example #60
0
 public UserController(IUserRepository userRepository, IPostRepository postRepository)
 {
     _userRepository = userRepository;
     _postRepository = postRepository;
 }