Exemplo n.º 1
0
 public UserActivityDataService(
     IEntityContext context,
     IPostCacheService postCacheService,
     IPostDataService postDataService,
     IUserInfoCacheService userInfoCacheService,
     IUserLikesDataService userLikesDataService,
     IReviewCacheService reviewCacheService,
     IUserLikeCacheService userLikesCacheService,
     IReviewDataService reviewDataService,
     IMapper mapper,
     IOptions <UserProfileImageSettings> userImageSettings
     )
 {
     _context               = context;
     _postCacheService      = postCacheService;
     _postDataService       = postDataService;
     _userInfoCacheService  = userInfoCacheService;
     _userLikesDataService  = userLikesDataService;
     _userLikesCacheService = userLikesCacheService;
     _reviewCacheService    = reviewCacheService;
     _reviewDataService     = reviewDataService;
     _dbSet  = _context.Set <UserActivity>();
     _mapper = mapper;
     _userProfileImageSettings = userImageSettings.Value;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Creating data controller
        /// </summary>
        /// <param name="postDataService">Post data to the database service</param>
        /// <param name="getDataService">Get data from the database service</param>
        public DataController(IPostDataService postDataService, IGetDataService getDataService,
                              IUnitOfWork unitOfWork, IDecryptService decryptService)
        {
            if (postDataService == null)
            {
                throw new ArgumentNullException(nameof(postDataService), " was null.");
            }

            if (getDataService == null)
            {
                throw new ArgumentNullException(nameof(getDataService), " was null.");
            }

            if (unitOfWork == null)
            {
                throw new ArgumentNullException(nameof(unitOfWork), " was null.");
            }

            if (decryptService == null)
            {
                throw new ArgumentNullException(nameof(decryptService), " was null.");
            }

            _postDataService = postDataService;
            _getDataService  = getDataService;
            _unitOfWork      = unitOfWork;
            _decryptService  = decryptService;
        }
Exemplo n.º 3
0
 public FeedService(
     IPostDataService postDataService,
     ILayoutDataService siteSettings)
 {
     _postDataService   = postDataService;
     _layoutDataService = siteSettings;
 }
Exemplo n.º 4
0
 public PostService(IPostDataService postDataService, ILog logger, IUserContext userContext, ITaskExecutor taskExecutor)
 {
     this.postDataService = postDataService;
     this.logger          = logger;
     this.userContext     = userContext;
     this.taskExecutor    = taskExecutor;
 }
Exemplo n.º 5
0
		public SetupService(IConfigurationDataService configurationDataService, IPostDataService postDataService, ICategoryDataService categoryService, ILog logger)
		{
			this.configurationDataService = configurationDataService;
			this.postDataService = postDataService;
			this.categoryService = categoryService;
			this.logger = logger;
		}
Exemplo n.º 6
0
 public SetupService(IConfigurationDataService configurationDataService, IPostDataService postDataService, ICategoryDataService categoryService, ILog logger)
 {
     this.configurationDataService = configurationDataService;
     this.postDataService          = postDataService;
     this.categoryService          = categoryService;
     this.logger = logger;
 }
Exemplo n.º 7
0
 public FeedDataService(
     IEntityContext context,
     IMapper mapper,
     IOptions <UserProfileImageSettings> options,
     IUserFollowCacheService userFollowCacheService,
     IReviewCacheService reviewCacheService,
     IReviewDataService reviewDataService,
     IUserInfoCacheService userCacheService,
     IGroupCacheService groupCacheService,
     IPostDataService postDataService,
     IUserLikeCacheService userLikesCacheService,
     IUserLikesDataService userLikesDataService,
     IPostCacheService postCacheService,
     IUserInfoDataService userInfoDataService
     )
 {
     _context = context;
     _mapper  = mapper;
     _userFollowCacheService   = userFollowCacheService;
     _groupCacheService        = groupCacheService;
     _userProfileImageSettings = options.Value;
     _userLikesCacheService    = userLikesCacheService;
     _userLikesDataService     = userLikesDataService;
     _reviewCacheService       = reviewCacheService;
     _userCacheService         = userCacheService;
     _reviewDataService        = reviewDataService;
     _postDataService          = postDataService;
     _userInfoDataService      = userInfoDataService;
     _postCacheService         = postCacheService;
 }
Exemplo n.º 8
0
 public TrackbackService(ILog logger, IPageDataService pageDataService, IPostDataService postDataService, ITrackBackDataService trackBackDataService, IUrlBuilder urlBuilder)
 {
     this.logger               = logger;
     this.pageDataService      = pageDataService;
     this.postDataService      = postDataService;
     this.trackBackDataService = trackBackDataService;
     this.urlBuilder           = urlBuilder;
 }
		public TrackbackService(ILog logger, IPageDataService pageDataService, IPostDataService postDataService, ITrackBackDataService trackBackDataService, IUrlBuilder urlBuilder)
		{
			this.logger = logger;
			this.pageDataService = pageDataService;
			this.postDataService = postDataService;
			this.trackBackDataService = trackBackDataService;
			this.urlBuilder = urlBuilder;
		}
Exemplo n.º 10
0
        public void TestInitialize()
        {
            _commentServiceMock = new Mock <ICommentDataService>();
            _SUT = new PostDataService(TestDataContext, _commentServiceMock.Object);

            _commentServiceMock
            .Setup(s => s.GetCommentsCreatedInRange(It.IsAny <DateTime>(), It.IsAny <DateTime>()))
            .Returns((DateTime from, DateTime until) => TestDataContext.Comments.ToList());
        }
Exemplo n.º 11
0
 public PostController(IPostDataService dataService, IUserDataService dataService2)
 {
     _dataService  = dataService;
     _dataService2 = dataService2;
     //Mapper.CreateMap<DomainModel.Post, Models.PostModel>();
     Mapper.Initialize(cfg => {
         //cfg.CreateMap<Source, Dest>();
         cfg.CreateMap <Post, PostListModel>();
         cfg.CreateMap <Post, PostModel>();
         cfg.CreateMap <Tag, TagModel>();
     });
 }
 public MarkedPostController(IMarkedPostDataService dataService, IPostDataService dataService2)
 {
     _dataService  = dataService;
     _dataService2 = dataService2;
     //Mapper.CreateMap<DomainModel.Post, Models.PostModel>();
     Mapper.Initialize(cfg => {
         //cfg.CreateMap<Source, Dest>();
         cfg.CreateMap <MarkedPost, MarkedPostListModel>();
         cfg.CreateMap <MarkedPost, MarkedPostModel>();
         cfg.CreateMap <MarkedPostCreateOrUpdateModel, MarkedPost>();
     });
 }
Exemplo n.º 13
0
 public AddPostController(
     IPostDataService postDataService,
     IPostPartService postPartService,
     IGroupDataService groupDataService,
     IPostActionService postActionService,
     IBus bus
     )
 {
     _postDataService   = postDataService;
     _postPartService   = postPartService;
     _groupDataService  = groupDataService;
     _postActionService = postActionService;
     _bus = bus;
 }
Exemplo n.º 14
0
 public PostCollectionDataService(
     IEntityContext entityContext,
     IOptions <PostCollectionSettings> collectionOp,
     IOptions <UserProfileImageSettings> uiSettings,
     IUserLikesDataService userLikesDataService,
     IUserLikeCacheService userLikesCacheService,
     IPostCacheService postCacheService,
     IPostDataService postDataService
     )
 {
     _entityContext         = entityContext;
     collectionSettings     = collectionOp.Value;
     _userImageSettings     = uiSettings.Value;
     _userLikesDataService  = userLikesDataService;
     _userLikesCacheService = userLikesCacheService;
     _postCacheService      = postCacheService;
     _postDataService       = postDataService;
 }
Exemplo n.º 15
0
 public PostController(
     IService <Post> postService,
     IReviewDataService reviewDataService,
     IUserInfoDataService userInfoDataService,
     ILoggerFactory loggerFactory,
     IPostActionService postActionService,
     IPostLikeDataService postLikeDataService,
     IPostDataService postDataService,
     ICacheProvider cacheProvider,
     IBus eventBus
     )
 {
     _postService         = postService;
     _userInfoDataService = userInfoDataService;
     _postLikeDataService = postLikeDataService;
     _postDataService     = postDataService;
     _postActionService   = postActionService;
     _logger            = loggerFactory.CreateLogger <PostController>();
     _cacheProvider     = cacheProvider;
     _reviewDataService = reviewDataService;
     _eventBus          = eventBus;
 }
Exemplo n.º 16
0
 public GroupController(
     IService <Group> groupService,
     IService <UserInfo> userInfoService,
     IService <Post> postService,
     IPostDataService postDataService,
     IGroupDataService groupDataService,
     IUserInfoDataService userInfoDataService,
     ILoggerFactory loggerFactory,
     IMapper mapper,
     IBus bus
     )
 {
     _groupService        = groupService;
     _userInfoService     = userInfoService;
     _postService         = postService;
     _postDataService     = postDataService;
     _groupDataService    = groupDataService;
     _userInfoDataService = userInfoDataService;
     _logger = loggerFactory.CreateLogger <GroupController>();
     _mapper = mapper;
     _bus    = bus;
 }
Exemplo n.º 17
0
 public PostController(IPostDataService postDataService)
 {
     _postDataService = postDataService;
 }
Exemplo n.º 18
0
 public BlogPostService(IPostDataService postDataService, IModelBuilder modelBuilder)
 {
     _postDataService = postDataService;
     _modelBuilder    = modelBuilder;
 }
Exemplo n.º 19
0
 public UserDataService(DataContext dataContext, IPostDataService postDataService)
 {
     _dbContext   = dataContext;
     _postService = postDataService;
 }
Exemplo n.º 20
0
 public MainViewModel(IPostDataService postDataService)
 {
     _postDataService = postDataService;
     Posts            = new ObservableCollection <Post>();
 }