本文整理汇总了C#中IPostRepository类的典型用法代码示例。如果您正苦于以下问题:C# IPostRepository类的具体用法?C# IPostRepository怎么用?C# IPostRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPostRepository类属于命名空间,在下文中一共展示了IPostRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PostsController
public PostsController(
IUnitOfWork unitOfWork,
IPostRepository postRepository)
{
_unitOfWork = unitOfWork;
_postRepository = postRepository;
}
示例2: SetUp
public void SetUp()
{
blogRP = MockRepository.GenerateMock<IBlogRepository>();
postRP = MockRepository.GenerateMock<IPostRepository>();
userRP = MockRepository.GenerateMock<IUserRepository>();
friendlyUrlGen = MockRepository.GenerateMock<IFriendlyUrlGenerator>();
}
示例3: PostService
public PostService(ISettingsService settingsService, IRoleService roleService, IPostRepository postRepository, ITopicRepository topicRepository)
{
this._postRepository = postRepository;
this._topicRepository = topicRepository;
this._roleService = roleService;
this._settingsService = settingsService;
}
示例4: PostService
public PostService(IPostRepository repository)
{
if (repository == null)
throw new ArgumentNullException("repository cannot be null");
postRepository = repository;
}
示例5: CommentService
public CommentService(IUnitOfWork unitOfWork, ICommentRepository commentRepository, IPostRepository post)
{
this.commentRepository = commentRepository;
this.postRepository = post;
this.unitOfWork = unitOfWork;
}
示例6: CommentServices
public CommentServices(ICommentRepository commentRepository, IPostRepository postRepository, UserServices userServices, AppConfiguration config)
{
this.commentRepository = commentRepository;
this.config = config;
this.userServices = userServices;
this.postRepository = postRepository;
}
示例7: ForumIdentityService
public ForumIdentityService(IForumRepository forumRepository, IDiscussionRepository discussionRepository,
IPostRepository postRepository)
{
this._forumRepository = forumRepository;
this._discussionRepository = discussionRepository;
this._postRepository = postRepository;
}
示例8: PostApplicationService
public PostApplicationService(IPostRepository postRepository, IForumRepository forumRepository,
ICollaboratorService collaboratorService)
{
this._postRepository = postRepository;
this._forumRepository = forumRepository;
this._collaboratorService = collaboratorService;
}
示例9: HomeController
public HomeController(ICalendarRepository repoCalendar, IPostRepository repoNewsItem,
ILeaderRepository repoLeader)
{
_repoCalendar = repoCalendar;
_repoNewsItem = repoNewsItem;
_repoLeader = repoLeader;
}
示例10: MembershipService
/// <summary>
/// Constructor
/// </summary>
/// <param name="membershipRepository"> </param>
/// <param name="settingsRepository"> </param>
/// <param name="emailService"> </param>
/// <param name="localizationService"> </param>
/// <param name="activityService"> </param>
/// <param name="privateMessageService"> </param>
/// <param name="membershipUserPointsService"> </param>
/// <param name="topicNotificationService"> </param>
/// <param name="voteService"> </param>
/// <param name="badgeService"> </param>
/// <param name="categoryNotificationService"> </param>
/// <param name="loggingService"></param>
/// <param name="uploadedFileService"></param>
/// <param name="postRepository"></param>
/// <param name="pollVoteRepository"></param>
/// <param name="pollAnswerRepository"></param>
/// <param name="pollRepository"></param>
/// <param name="topicRepository"></param>
/// <param name="favouriteRepository"></param>
/// <param name="categoryService"></param>
public MembershipService(IMembershipRepository membershipRepository, ISettingsRepository settingsRepository,
IEmailService emailService, ILocalizationService localizationService, IActivityService activityService,
IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService,
ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService,
ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService,
IPostRepository postRepository, IPollVoteRepository pollVoteRepository, IPollAnswerRepository pollAnswerRepository,
IPollRepository pollRepository, ITopicRepository topicRepository, IFavouriteRepository favouriteRepository,
ICategoryService categoryService)
{
_membershipRepository = membershipRepository;
_settingsRepository = settingsRepository;
_emailService = emailService;
_localizationService = localizationService;
_activityService = activityService;
_privateMessageService = privateMessageService;
_membershipUserPointsService = membershipUserPointsService;
_topicNotificationService = topicNotificationService;
_voteService = voteService;
_badgeService = badgeService;
_categoryNotificationService = categoryNotificationService;
_loggingService = loggingService;
_uploadedFileService = uploadedFileService;
_postRepository = postRepository;
_pollVoteRepository = pollVoteRepository;
_pollAnswerRepository = pollAnswerRepository;
_pollRepository = pollRepository;
_topicRepository = topicRepository;
_favouriteRepository = favouriteRepository;
_categoryService = categoryService;
}
示例11: HomeController
public HomeController(IPostRepository postRepository,
IEmailer messagingService,
IViewMapper viewMapper)
: base(postRepository, viewMapper)
{
_viewMapper = viewMapper;
MessagingService = messagingService;
}
示例12: HomeController
public HomeController(IPostRepository postRepository)
{
_posts = postRepository;
_userRepository = new UserRepository();
_roleRepository = new RoleRepository();
_users = new UserService(ModelState, _userRepository, _roleRepository);
}
示例13: PostService
public PostService(IPostRepository postRepository,
ICommentRepository commentRepository,
ICategoryRepository categoryRepository)
{
this.postRepository = postRepository;
this.commentRepository = commentRepository;
this.categoryRepository = categoryRepository;
}
示例14: HomeController
public HomeController(IDiscussionRepository<Discussion> discussionRepository,
IPostRepository<Post> postRepository )
{
_discussionRepository = discussionRepository;
_postRepository = postRepository;
Mapper.AddProfile<HomeMappingProfile>();
}
示例15: SetUp
public void SetUp()
{
TestData.Init();
_repository = MockRepository.GenerateStub<IPostRepository>();
_service = new SyndicationService(_repository);
_repository.Stub(m => m.FindAll()).Return(new[] {TestData.PublishedPost});
_feed = _service.GetPostsAsSyndicationFeed(new Uri("http://test.com/testrss"));
}