C# Class Blog.Services.Implementation.PostsService

Inheritance: BaseService, IPostsService
显示文件 Open project: jsnmgpnty/Blogness2.0

Public Methods

Method Description
AddPost ( Post post ) : Post
DeletePost ( int postId ) : bool
GetMorePopularPosts ( int postsCount, int skip ) : List
GetMorePostsByTag ( string tagName, int skip ) : List
GetMorePostsByUser ( int userId, int skip ) : List
GetMoreRecentPosts ( int postsCount, int skip ) : List
GetPopularPosts ( int postsCount ) : List
GetPost ( int postId ) : Post
GetPostsByCommunity ( int communityId, int threshold = 10, int skip = 10 ) : List
GetPostsByTag ( string tagName ) : List
GetPostsByUser ( int userId ) : List
GetPostsForUser ( int userId, int threshold = 5, int skip = 10 ) : List
GetRecentPosts ( int postsCount ) : List
GetRelatedPosts ( int postId ) : RelatedPosts
PostsService ( IPostsLogic postsLogic, ICommentsLogic commentsLogic, IPostLikesLogic postLikesLogic, IViewCountLogic viewCountLogic, IConfigurationHelper configurationHelper, IErrorSignaler errorSignaler ) : System.Collections.Generic
SearchPosts ( string query, int threshold = 5, int skip = 10 ) : List
UpdatePost ( Post post ) : Post

Private Methods

Method Description
SetPostProperties ( IEnumerable posts ) : List

Method Details

AddPost() public method

public AddPost ( Post post ) : Post
post Blog.Common.Contracts.Post
return Blog.Common.Contracts.Post

DeletePost() public method

public DeletePost ( int postId ) : bool
postId int
return bool

GetMorePopularPosts() public method

public GetMorePopularPosts ( int postsCount, int skip ) : List
postsCount int
skip int
return List

GetMorePostsByTag() public method

public GetMorePostsByTag ( string tagName, int skip ) : List
tagName string
skip int
return List

GetMorePostsByUser() public method

public GetMorePostsByUser ( int userId, int skip ) : List
userId int
skip int
return List

GetMoreRecentPosts() public method

public GetMoreRecentPosts ( int postsCount, int skip ) : List
postsCount int
skip int
return List

GetPopularPosts() public method

public GetPopularPosts ( int postsCount ) : List
postsCount int
return List

GetPost() public method

public GetPost ( int postId ) : Post
postId int
return Blog.Common.Contracts.Post

GetPostsByCommunity() public method

public GetPostsByCommunity ( int communityId, int threshold = 10, int skip = 10 ) : List
communityId int
threshold int
skip int
return List

GetPostsByTag() public method

public GetPostsByTag ( string tagName ) : List
tagName string
return List

GetPostsByUser() public method

public GetPostsByUser ( int userId ) : List
userId int
return List

GetPostsForUser() public method

public GetPostsForUser ( int userId, int threshold = 5, int skip = 10 ) : List
userId int
threshold int
skip int
return List

GetRecentPosts() public method

public GetRecentPosts ( int postsCount ) : List
postsCount int
return List

GetRelatedPosts() public method

public GetRelatedPosts ( int postId ) : RelatedPosts
postId int
return Blog.Common.Contracts.ViewModels.RelatedPosts

PostsService() public method

public PostsService ( IPostsLogic postsLogic, ICommentsLogic commentsLogic, IPostLikesLogic postLikesLogic, IViewCountLogic viewCountLogic, IConfigurationHelper configurationHelper, IErrorSignaler errorSignaler ) : System.Collections.Generic
postsLogic IPostsLogic
commentsLogic ICommentsLogic
postLikesLogic IPostLikesLogic
viewCountLogic IViewCountLogic
configurationHelper IConfigurationHelper
errorSignaler IErrorSignaler
return System.Collections.Generic

SearchPosts() public method

public SearchPosts ( string query, int threshold = 5, int skip = 10 ) : List
query string
threshold int
skip int
return List

UpdatePost() public method

public UpdatePost ( Post post ) : Post
post Blog.Common.Contracts.Post
return Blog.Common.Contracts.Post