コード例 #1
0
 public PostInteractService(IFavoriteDao favoriteDao, ICommentDao commentDao, IPostDao postDao, IUserDao userDao)
 {
     this.favoriteDao = favoriteDao;
     this.commentDao  = commentDao;
     this.postDao     = postDao;
     this.userDao     = userDao;
 }
コード例 #2
0
 public SubsController(IContextService contextService,
     ISubDao subDao,
     IMapper mapper,
     ICommandBus commandBus,
     IUserContext userContext,
     IPostDao postDao,
     IVoteDao voteDao,
     ICommentDao commentDao,
     IPermissionDao permissionDao,
     ICommentNodeHierarchyBuilder commentNodeHierarchyBuilder,
     ICommentTreeContextBuilder commentTreeContextBuilder,
     IPostWrapper postWrapper,
     ISubWrapper subWrapper,
     ICommentWrapper commentWrapper)
 {
     _contextService = contextService;
     _subDao = subDao;
     _mapper = mapper;
     _commandBus = commandBus;
     _userContext = userContext;
     _postDao = postDao;
     _voteDao = voteDao;
     _commentDao = commentDao;
     _permissionDao = permissionDao;
     _commentNodeHierarchyBuilder = commentNodeHierarchyBuilder;
     _commentTreeContextBuilder = commentTreeContextBuilder;
     _postWrapper = postWrapper;
     _subWrapper = subWrapper;
     _commentWrapper = commentWrapper;
 }
コード例 #3
0
ファイル: PostWrapper.cs プロジェクト: richardrcruzc/skimur
 public PostWrapper(IPostDao postDao, IMembershipService membershipService, ISubDao subDao, IVoteDao voteDao)
 {
     _postDao = postDao;
     _membershipService = membershipService;
     _subDao = subDao;
     _voteDao = voteDao;
 }
コード例 #4
0
ファイル: BlogsStorage.cs プロジェクト: Wifisoft/teamlab.v6.5
        public BlogsStorage(string dbId, int tenant)
        {
            _db     = new DbManager(dbId);
            _tenant = tenant;

            _blogDao = new DbBlogDao(_db, _tenant);
            _postDao = new DbPostDao(_db, _tenant);
        }
コード例 #5
0
ファイル: BlogsStorage.cs プロジェクト: ridhouan/teamlab.v6.5
        public BlogsStorage(string dbId,int tenant)
        {
            _db = new DbManager(dbId);
            _tenant = tenant;

            _blogDao = new DbBlogDao(_db, _tenant);
            _postDao = new DbPostDao(_db, _tenant); 
        }
コード例 #6
0
 public NewFeedService(IUserDao userDao, IPostDao postDao, ICommentDao commentDao, IFavoriteDao favoriteDao,
                       IRelationshipService relationshipService)
 {
     this.userDao             = userDao;
     this.postDao             = postDao;
     this.commentDao          = commentDao;
     this.favoriteDao         = favoriteDao;
     this.relationshipService = relationshipService;
 }
コード例 #7
0
 public CommentWrapper(ICommentDao commentDao, IMembershipService membershipService, ISubDao subDao, IPostDao postDao, IPermissionDao permissionDao, IVoteDao voteDao)
 {
     _commentDao = commentDao;
     _membershipService = membershipService;
     _subDao = subDao;
     _postDao = postDao;
     _permissionDao = permissionDao;
     _voteDao = voteDao;
 }
コード例 #8
0
        public DataAccess(
            IPostDao postDao,
            ICommentDao commentDao)
        {
            PostDao = postDao ??
                      throw new ArgumentNullException($"{nameof(postDao)}");

            CommentDao = commentDao ??
                         throw new ArgumentNullException($"{nameof(commentDao)}");
        }
コード例 #9
0
        public static Post Get(this IPostDao pDao, Guid id, bool withTags, bool withCommentsCount)
        {
            var list = pDao.Select(id, null, null, true, withTags, withCommentsCount);

            if (list.Count == 1)
            {
                return(list[0]);
            }
            else
            {
                return(null);
            }
        }
コード例 #10
0
ファイル: PostWrapper.cs プロジェクト: snetts/skimur
 public PostWrapper(IPostDao postDao,
                    IMembershipService membershipService,
                    ISubDao subDao,
                    IVoteDao voteDao,
                    IPermissionDao permissionDao,
                    IReportDao reportDao)
 {
     _postDao           = postDao;
     _membershipService = membershipService;
     _subDao            = subDao;
     _voteDao           = voteDao;
     _permissionDao     = permissionDao;
     _reportDao         = reportDao;
 }
コード例 #11
0
ファイル: PostWrapper.cs プロジェクト: skimur/skimur
 public PostWrapper(IPostDao postDao, 
     IMembershipService membershipService, 
     ISubDao subDao, 
     IVoteDao voteDao,
     IPermissionDao permissionDao,
     IReportDao reportDao)
 {
     _postDao = postDao;
     _membershipService = membershipService;
     _subDao = subDao;
     _voteDao = voteDao;
     _permissionDao = permissionDao;
     _reportDao = reportDao;
 }
コード例 #12
0
 public PostsController(ISubDao subDao,
     ISubWrapper subWrapper,
     IPostDao postDao,
     IPostWrapper postWrapper,
     IUserContext userContext,
     ICommandBus commandBus,
     ILogger<PostsController> logger)
 {
     _subDao = subDao;
     _subWrapper = subWrapper;
     _postDao = postDao;
     _postWrapper = postWrapper;
     _userContext = userContext;
     _commandBus = commandBus;
     _logger = logger;
 }
コード例 #13
0
        public static List <Typle <Post, Typle <int, int> > > GetCommentsStatistic(this IPostDao pDao, List <Post> posts, Guid forUser)
        {
            List <Guid> ids = posts.ConvertAll(p => p.ID);
            var         dic = pDao.GetCommentsStatistic(ids, forUser);

            var result = new List <Typle <Post, Typle <int, int> > >(posts.Count);

            foreach (var post in posts)
            {
                result.Add(new Typle <Post, Typle <int, int> >
                {
                    Value1 = post,
                    Value2 = dic[post.ID]
                });
            }

            return(result);
        }
コード例 #14
0
ファイル: UsersController.cs プロジェクト: skimur/skimur
 public UsersController(IMembershipService membershipService,
     ISubDao subDao,
     IModerationDao moderationDao,
     IKarmaDao karmaDao,
     ICommentDao commentDao,
     ICommentWrapper commentWrapper,
     IPostDao postDao,
     IPostWrapper postWrapper,
     IUserContext userContext,
     IContextService contextService)
 {
     _membershipService = membershipService;
     _subDao = subDao;
     _moderationDao = moderationDao;
     _karmaDao = karmaDao;
     _commentDao = commentDao;
     _commentWrapper = commentWrapper;
     _postDao = postDao;
     _postWrapper = postWrapper;
     _userContext = userContext;
     _contextService = contextService;
 }
コード例 #15
0
 public ReportsController(ILogger <ReportsController> logger,
                          ICommandBus commandBus,
                          IUserContext userContext,
                          ISubDao subDao,
                          ISubWrapper subWrapper,
                          IPermissionDao permissionDao,
                          IPostDao postDao,
                          IPostWrapper postWrapper,
                          ICommentDao commentDao,
                          ICommentWrapper commentWrapper)
 {
     _logger         = logger;
     _commandBus     = commandBus;
     _userContext    = userContext;
     _subDao         = subDao;
     _subWrapper     = subWrapper;
     _permissionDao  = permissionDao;
     _postDao        = postDao;
     _postWrapper    = postWrapper;
     _commentDao     = commentDao;
     _commentWrapper = commentWrapper;
 }
コード例 #16
0
ファイル: UsersController.cs プロジェクト: snetts/skimur
 public UsersController(IMembershipService membershipService,
                        ISubDao subDao,
                        IModerationDao moderationDao,
                        IKarmaDao karmaDao,
                        ICommentDao commentDao,
                        ICommentWrapper commentWrapper,
                        IPostDao postDao,
                        IPostWrapper postWrapper,
                        IUserContext userContext,
                        IContextService contextService)
 {
     _membershipService = membershipService;
     _subDao            = subDao;
     _moderationDao     = moderationDao;
     _karmaDao          = karmaDao;
     _commentDao        = commentDao;
     _commentWrapper    = commentWrapper;
     _postDao           = postDao;
     _postWrapper       = postWrapper;
     _userContext       = userContext;
     _contextService    = contextService;
 }
コード例 #17
0
ファイル: ReportsController.cs プロジェクト: skimur/skimur
 public ReportsController(ILogger<ReportsController> logger,
     ICommandBus commandBus,
     IUserContext userContext,
     ISubDao subDao,
     ISubWrapper subWrapper,
     IPermissionDao permissionDao,
     IPostDao postDao,
     IPostWrapper postWrapper,
     ICommentDao commentDao,
     ICommentWrapper commentWrapper)
 {
     _logger = logger;
     _commandBus = commandBus;
     _userContext = userContext;
     _subDao = subDao;
     _subWrapper = subWrapper;
     _permissionDao = permissionDao;
     _postDao = postDao;
     _postWrapper = postWrapper;
     _commentDao = commentDao;
     _commentWrapper = commentWrapper;
 }
コード例 #18
0
 public SubsController(IContextService contextService,
                       ISubDao subDao,
                       IMapper mapper,
                       ICommandBus commandBus,
                       IUserContext userContext,
                       IPostDao postDao,
                       IVoteDao voteDao,
                       ICommentDao commentDao,
                       IPermissionDao permissionDao,
                       ICommentNodeHierarchyBuilder commentNodeHierarchyBuilder,
                       ICommentTreeContextBuilder commentTreeContextBuilder,
                       IPostWrapper postWrapper,
                       ISubWrapper subWrapper,
                       ICommentWrapper commentWrapper,
                       IMembershipService membershipService,
                       ISettingsProvider <SubSettings> subSettings,
                       ISubActivityDao subActivityDao,
                       IModerationDao moderationDao)
 {
     _contextService = contextService;
     _subDao         = subDao;
     _mapper         = mapper;
     _commandBus     = commandBus;
     _userContext    = userContext;
     _postDao        = postDao;
     _voteDao        = voteDao;
     _commentDao     = commentDao;
     _permissionDao  = permissionDao;
     _commentNodeHierarchyBuilder = commentNodeHierarchyBuilder;
     _commentTreeContextBuilder   = commentTreeContextBuilder;
     _postwrapper        = postWrapper;
     _subwrapper         = subWrapper;
     _commentWrapper     = commentWrapper;
     _membershiipService = membershipService;
     _subSettings        = subSettings;
     _subActivityDao     = subActivityDao;
     _moderationDao      = moderationDao;
 }
コード例 #19
0
ファイル: SubsController.cs プロジェクト: skimur/skimur
 public SubsController(IContextService contextService,
     ISubDao subDao,
     IMapper mapper,
     ICommandBus commandBus,
     IUserContext userContext,
     IPostDao postDao,
     IVoteDao voteDao,
     ICommentDao commentDao,
     IPermissionDao permissionDao,
     ICommentNodeHierarchyBuilder commentNodeHierarchyBuilder,
     ICommentTreeContextBuilder commentTreeContextBuilder,
     IPostWrapper postWrapper,
     ISubWrapper subWrapper,
     ICommentWrapper commentWrapper,
     IMembershipService membershipService,
     ISettingsProvider<SubSettings> subSettings,
     ISubActivityDao subActivityDao,
     IModerationDao moderationDao)
 {
     _contextService = contextService;
     _subDao = subDao;
     _mapper = mapper;
     _commandBus = commandBus;
     _userContext = userContext;
     _postDao = postDao;
     _voteDao = voteDao;
     _commentDao = commentDao;
     _permissionDao = permissionDao;
     _commentNodeHierarchyBuilder = commentNodeHierarchyBuilder;
     _commentTreeContextBuilder = commentTreeContextBuilder;
     _postWrapper = postWrapper;
     _subWrapper = subWrapper;
     _commentWrapper = commentWrapper;
     _membershipService = membershipService;
     _subSettings = subSettings;
     _subActivityDao = subActivityDao;
     _moderationDao = moderationDao;
 }
コード例 #20
0
ファイル: PostsController.cs プロジェクト: skimur/skimur
 public PostsController(ISubDao subDao,
     ISubWrapper subWrapper,
     IPostDao postDao,
     IPostWrapper postWrapper,
     IUserContext userContext,
     ICommandBus commandBus,
     IContextService contextService,
     ICommentTreeContextBuilder commentTreeContextBuilder,
     ICommentDao commentDao,
     ISubActivityDao subActivityDao,
     ICommentNodeHierarchyBuilder commentNodeHierarchyBuilder)
 {
     _subDao = subDao;
     _subWrapper = subWrapper;
     _postDao = postDao;
     _postWrapper = postWrapper;
     _userContext = userContext;
     _commandBus = commandBus;
     _contextService = contextService;
     _commentTreeContextBuilder = commentTreeContextBuilder;
     _commentDao = commentDao;
     _subActivityDao = subActivityDao;
     _commentNodeHierarchyBuilder = commentNodeHierarchyBuilder;
 }
コード例 #21
0
ファイル: PostsController.cs プロジェクト: snetts/skimur
 public PostsController(ISubDao subDao,
                        ISubWrapper subWrapper,
                        IPostDao postDao,
                        IPostWrapper postWrapper,
                        IUserContext userContext,
                        ICommandBus commandBus,
                        IContextService contextService,
                        ICommentTreeContextBuilder commentTreeContextBuilder,
                        ICommentDao commentDao,
                        ISubActivityDao subActivityDao,
                        ICommentNodeHierarchyBuilder commentNodeHierarchyBuilder)
 {
     _subDao                      = subDao;
     _subWrapper                  = subWrapper;
     _postDao                     = postDao;
     _postWrapper                 = postWrapper;
     _userContext                 = userContext;
     _commandBus                  = commandBus;
     _contextService              = contextService;
     _commentTreeContextBuilder   = commentTreeContextBuilder;
     _commentDao                  = commentDao;
     _subActivityDao              = subActivityDao;
     _commentNodeHierarchyBuilder = commentNodeHierarchyBuilder;
 }
コード例 #22
0
 /// <summary>
 /// builder for injection
 /// </summary>
 /// <param name="repo"></param>
 public PostMananger(IPostDao repo)
 {
     Repo = repo;
 }
 public PostPresentationService(IPostDao postDao, ICommentDao commentDao, ILogger logger)
 {
     this.postDao    = postDao;
     this.commentDao = commentDao;
     this.logger     = logger;
 }
コード例 #24
0
 public ProfileService(IUserDao userDao, IPostDao postDao, IRelationshipDao relationShipDao)
 {
     this.userDao         = userDao;
     this.postDao         = postDao;
     this.relationShipDao = relationShipDao;
 }
コード例 #25
0
 public static Post Get(this IPostDao pDao, Guid id)
 {
     return(Get(pDao, id, true, false));
 }
コード例 #26
0
 public static List <Post> GetUserPostsDesc(this IPostDao pDao, Guid userId, string tag, int?from, int?count)
 {
     return(pDao.Select(null, null, userId, tag, true, false, from, count, true, true));
 }
コード例 #27
0
 public static int GetPostsByTagCount(this IPostDao pDao, string tag)
 {
     return(pDao.GetCount(null, null, null, tag));
 }
コード例 #28
0
 public static int GetAllPostsCount(this IPostDao pDao)
 {
     return(pDao.GetCount(null, null, null, null));
 }
コード例 #29
0
 public BlogsStorage(string dbId, int tenant)
 {
     _db      = DbManager.FromHttpContext(dbId);
     _tenant  = tenant;
     _postDao = new DbPostDao(_db, _tenant);
 }
コード例 #30
0
 public static int GetUserPostsCount(this IPostDao pDao, Guid userId, string tag)
 {
     return(pDao.GetCount(null, null, userId, tag));
 }
コード例 #31
0
 public static List <Post> GetPostsByTagDesc(this IPostDao pDao, string tag, int?from, int?count)
 {
     return(pDao.Select(null, null, null, tag, true, false, from, count, true, true));
 }
コード例 #32
0
 public static List <Post> GetAllPostsDesc(this IPostDao pDao, int?from, int?count)
 {
     return(pDao.Select(null, null, null, null, true, false, from, count, true, true));
 }