C# Class RedisStackOverflow.ServiceInterface.Repository

Inheritance: IRepository
ファイルを表示 Open project: ServiceStack/ServiceStack.Examples

Private Properties

Property Type Description
ToQuestionResults List

Public Methods

Method Description
DeleteAnswer ( long questionId, long answerId ) : void

Delete Answer by performing compensating actions to StoreAnswer() to keep the datastore in a consistent state

DeleteQuestion ( long questionId ) : void

Delete question by performing compensating actions to StoreQuestion() to keep the datastore in a consistent state

GetAllQuestions ( ) : List
GetAnswersForQuestion ( long questionId ) : List
GetOrCreateUser ( RedisStackOverflow.ServiceModel.User user ) : RedisStackOverflow.ServiceModel.User
GetQuestion ( long questionId ) : RedisStackOverflow.ServiceModel.QuestionResult
GetQuestionStats ( long questionId ) : RedisStackOverflow.ServiceModel.QuestionStat
GetQuestionsByUser ( long userId ) : List
GetQuestionsTaggedWith ( string tagName ) : List
GetRecentQuestionResults ( int skip, int take ) : List
GetSiteStats ( ) : RedisStackOverflow.ServiceModel.SiteStats
GetTagsByPopularity ( int skip, int take ) : List
GetUserStats ( long userId ) : RedisStackOverflow.ServiceModel.UserStat
GetUsersByIds ( IEnumerable userIds ) : List
Repository ( IRedisClientsManager redisManager ) : System
StoreAnswer ( RedisStackOverflow.ServiceModel.Answer answer ) : void
StoreQuestion ( RedisStackOverflow.ServiceModel.Question question ) : void
VoteAnswerDown ( long userId, long answerId ) : void
VoteAnswerUp ( long userId, long answerId ) : void
VoteQuestionDown ( long userId, long questionId ) : void
VoteQuestionUp ( long userId, long questionId ) : void

Private Methods

Method Description
ToQuestionResults ( IEnumerable questions ) : List

Method Details

DeleteAnswer() public method

Delete Answer by performing compensating actions to StoreAnswer() to keep the datastore in a consistent state
public DeleteAnswer ( long questionId, long answerId ) : void
questionId long
answerId long
return void

DeleteQuestion() public method

Delete question by performing compensating actions to StoreQuestion() to keep the datastore in a consistent state
public DeleteQuestion ( long questionId ) : void
questionId long
return void

GetAllQuestions() public method

public GetAllQuestions ( ) : List
return List

GetAnswersForQuestion() public method

public GetAnswersForQuestion ( long questionId ) : List
questionId long
return List

GetOrCreateUser() public method

public GetOrCreateUser ( RedisStackOverflow.ServiceModel.User user ) : RedisStackOverflow.ServiceModel.User
user RedisStackOverflow.ServiceModel.User
return RedisStackOverflow.ServiceModel.User

GetQuestion() public method

public GetQuestion ( long questionId ) : RedisStackOverflow.ServiceModel.QuestionResult
questionId long
return RedisStackOverflow.ServiceModel.QuestionResult

GetQuestionStats() public method

public GetQuestionStats ( long questionId ) : RedisStackOverflow.ServiceModel.QuestionStat
questionId long
return RedisStackOverflow.ServiceModel.QuestionStat

GetQuestionsByUser() public method

public GetQuestionsByUser ( long userId ) : List
userId long
return List

GetQuestionsTaggedWith() public method

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

GetRecentQuestionResults() public method

public GetRecentQuestionResults ( int skip, int take ) : List
skip int
take int
return List

GetSiteStats() public method

public GetSiteStats ( ) : RedisStackOverflow.ServiceModel.SiteStats
return RedisStackOverflow.ServiceModel.SiteStats

GetTagsByPopularity() public method

public GetTagsByPopularity ( int skip, int take ) : List
skip int
take int
return List

GetUserStats() public method

public GetUserStats ( long userId ) : RedisStackOverflow.ServiceModel.UserStat
userId long
return RedisStackOverflow.ServiceModel.UserStat

GetUsersByIds() public method

public GetUsersByIds ( IEnumerable userIds ) : List
userIds IEnumerable
return List

Repository() public method

public Repository ( IRedisClientsManager redisManager ) : System
redisManager IRedisClientsManager
return System

StoreAnswer() public method

public StoreAnswer ( RedisStackOverflow.ServiceModel.Answer answer ) : void
answer RedisStackOverflow.ServiceModel.Answer
return void

StoreQuestion() public method

public StoreQuestion ( RedisStackOverflow.ServiceModel.Question question ) : void
question RedisStackOverflow.ServiceModel.Question
return void

VoteAnswerDown() public method

public VoteAnswerDown ( long userId, long answerId ) : void
userId long
answerId long
return void

VoteAnswerUp() public method

public VoteAnswerUp ( long userId, long answerId ) : void
userId long
answerId long
return void

VoteQuestionDown() public method

public VoteQuestionDown ( long userId, long questionId ) : void
userId long
questionId long
return void

VoteQuestionUp() public method

public VoteQuestionUp ( long userId, long questionId ) : void
userId long
questionId long
return void