Esempio n. 1
0
 public ServiceOfMessage(
     IMapper mapper,
     ServiceOfUser serviceOfUser,
     IRepository <UserProfileEntity> repositoryOfUserProfile,
     IRepository <MessageEntity> repositoryOfMessage
     )
 {
     this.mapper                  = mapper;
     this.serviceOfUser           = serviceOfUser;
     this.repositoryOfUserProfile = repositoryOfUserProfile;
     this.repositoryOfMessage     = repositoryOfMessage;
 }
 public ServiceOfChat(
     IMapper mapper,
     ServiceOfUser serviceOfUser,
     ServiceOfMessage serviceOfMessage,
     IRepository <UserProfileEntity> repositoryOfUserProfile,
     IRepository <ChatRoomEntity> repositoryOfChatRoom,
     IRepository <UserChatEntity> repositoryOfUserChat
     )
 {
     this.mapper                  = mapper;
     this.serviceOfUser           = serviceOfUser;
     this.serviceOfMessage        = serviceOfMessage;
     this.repositoryOfChatRoom    = repositoryOfChatRoom;
     this.repositoryOfUserProfile = repositoryOfUserProfile;
     this.repositoryOfUserChat    = repositoryOfUserChat;
 }
Esempio n. 3
0
        public ServiceOfPost(
            IMapper mapper,
            ServiceOfImage serviceOfImage,
            ServiceOfAccount serviceOfAccount,
            ServiceOfComment serviceOfComment,
            ServiceOfUser serviceOfUser,
            ServiceOfTag serviceOfTag,
            ServiceOfSearch serviceOfSearch,
            IRepository <PostEntity> repositoryOfPost,
            IRepository <PostRatingEntity> repositoryOfPostRating,
            IRepository <ApplicationUserEntity> repositoryOfApplicationUser,
            IRepository <SectionEntity> repositoryOfSection,
            IRepository <ImageEntity> repositoryOfImage
            )
        {
            this.mapper                      = mapper;
            this.repositoryOfPost            = repositoryOfPost;
            this.repositoryOfPostRating      = repositoryOfPostRating;
            this.repositoryOfApplicationUser = repositoryOfApplicationUser;
            this.repositoryOfSection         = repositoryOfSection;
            this.repositoryOfImage           = repositoryOfImage;
            this.serviceOfImage              = serviceOfImage;
            this.serviceOfAccount            = serviceOfAccount;
            this.serviceOfComment            = serviceOfComment;
            this.serviceOfUser               = serviceOfUser;
            this.serviceOfTag                = serviceOfTag;
            this.serviceOfSearch             = serviceOfSearch;

            Config = new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >[]
            {
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostCompactViewModel), GetPostCompactViewModel),
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostUpdateViewModel), GetPostUpdateViewModel),
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostMiniViewModel), GetPostMiniViewModel),
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostViewModel), GetPostViewModel)
            };
        }
Esempio n. 4
0
 public ServiceOfComment(
     IMapper mapper,
     ServiceOfUser serviceOfUser,
     ServiceOfSearch serviceOfSearch,
     IRepository <PostEntity> repositoryOfPost,
     IRepository <CommentEntity> repositoryOfComment,
     IRepository <CommentLikeEntity> repositoryOfCommentLike,
     IRepository <ApplicationUserEntity> repositoryOfApplicationUser,
     IRepository <UserProfileEntity> repositoryOfUserProfile
     )
 {
     this.mapper                      = mapper;
     this.repositoryOfPost            = repositoryOfPost;
     this.repositoryOfComment         = repositoryOfComment;
     this.repositoryOfCommentLike     = repositoryOfCommentLike;
     this.repositoryOfApplicationUser = repositoryOfApplicationUser;
     this.repositoryOfUserProfile     = repositoryOfUserProfile;
     this.serviceOfUser               = serviceOfUser;
     Config = new[]
     {
         new Tuple <string, Func <CommentEntity, ApplicationUserEntity, BaseCommentViewModel> >(nameof(CommentViewModel), GetCommentViewModel),
         new Tuple <string, Func <CommentEntity, ApplicationUserEntity, BaseCommentViewModel> >(nameof(CommentMiniViewModel), GetCommentMiniViewModel)
     };
 }