本文整理汇总了C#中ICommentService类的典型用法代码示例。如果您正苦于以下问题:C# ICommentService类的具体用法?C# ICommentService怎么用?C# ICommentService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICommentService类属于命名空间,在下文中一共展示了ICommentService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
eventId = Convert.ToInt64(Request.Params.Get("eventId"));
commentId = Convert.ToInt64(Request.Params.Get("commentId"));
IUnityContainer container = (IUnityContainer)HttpContext.Current.Application["unityContainer"];
commentService = container.Resolve<ICommentService>();
if (!IsPostBack)
{
CommentInfo c = commentService.GetCommentById(commentId);
List<Tag> tags = commentService.GetTagsByCommentId(commentId);
string stags = ParseTags(tags);
this.txtComment.Text = c.texto;
this.txtTags.Text = stags;
}
if (!SessionManager.IsUserAuthenticated(Context))
{
/* Do action. */
String url =
Settings.Default.PracticaMaD_applicationURL +
"Pages/User/Authentication.aspx" + "?eventId=" + eventId;
Response.Redirect(Response.ApplyAppPathModifier(url));
}
else
{
userId = SessionManager.GetUserSession(Context).UserProfileId;
}
}
示例2: ProductDetails
static ProductDetails() {
IUnityContainer container =
(IUnityContainer)HttpContext.Current.Application["unityContainer"];
productService = container.Resolve<IProductService>();
commentService = container.Resolve<ICommentService>();
}
示例3: AdminCommentController
public AdminCommentController(ILog log, IContentItemService<Post> contentItemService, ICommentService commentService, ILocalizationService localizationService, IUserService userService, ISiteService siteService)
: base(log, localizationService, userService, siteService)
{
this.log = log;
this.commentService = commentService;
this.contentItemService = contentItemService;
}
示例4: PostController
public PostController(DbContext dbContext, IPostService postService, ICommentService commentService, IPagingHandler<Post> pagingHandler)
: base(dbContext)
{
this._postService = postService;
_commentService = commentService;
_pagingHandler = pagingHandler;
}
示例5: CommentController
public CommentController(IOrchardServices services, ICommentService commentService, INotifier notifier)
{
Services = services;
_commentService = commentService;
_notifier = notifier;
T = NullLocalizer.Instance;
}
示例6: CommentController
public CommentController(ICommentMapper commentMapper, IImageAlbumService imageAlbumService, ICommentService commentService, IMembershipService membershipService)
{
this._commentMapper = commentMapper;
this._imageAlbumService = imageAlbumService;
this._commentService = commentService;
this._membershipService = membershipService;
}
示例7: CommentsController
public CommentsController(IUsersService users, ICommentService comments, IHomeService homes, INeedService needs)
: base(users)
{
this.comments = comments;
this.homes = homes;
this.needs = needs;
}
示例8: ChatApiController
public ChatApiController(IUserService service, IChatService service2, ICommentService service3, ILiveChat service4)
{
this._userService = service;
this._chatService = service2;
this._commentService = service3;
this._LiveChat = service4;
}
示例9: ArticleController
public ArticleController(IBlogService blogService, IArticleService articleService, ITagService tagService, ICommentService commentService)
{
_blogService = blogService;
_articleService = articleService;
_tagService = tagService;
_commentService = commentService;
}
示例10: CommentsPartHandler
public CommentsPartHandler(
IContentManager contentManager,
IRepository<CommentsPartRecord> commentsRepository,
ICommentService commentService) {
Filters.Add(StorageFilter.For(commentsRepository));
OnInitializing<CommentsPart>((ctx, part) => {
part.CommentsActive = true;
part.CommentsShown = true;
part.Comments = new List<CommentPart>();
});
OnLoading<CommentsPart>((context, comments) => {
comments.CommentsField.Loader(list => contentManager
.Query<CommentPart, CommentPartRecord>()
.Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Approved)
.OrderBy(x => x.Position)
.List().ToList());
comments.PendingCommentsField.Loader(list => contentManager
.Query<CommentPart, CommentPartRecord>()
.Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Pending)
.List().ToList());
});
OnRemoved<CommentsPart>(
(context, c) => {
var comments = commentService.GetCommentsForCommentedContent(context.ContentItem.Id).List();
foreach (var comment in comments) {
contentManager.Remove(comment.ContentItem);
}
});
}
示例11: BlogImportRepository
public BlogImportRepository(ISubtextContext context, ICommentService commentService, IEntryPublisher entryPublisher, IBlogMLImportMapper mapper)
{
SubtextContext = context;
CommentService = commentService;
EntryPublisher = entryPublisher;
Mapper = mapper;
}
示例12: CommentsController
public CommentsController(ICommentService comments, IAnimalService animals, IUserService users, ISanitizer sanitizeService)
{
this.comments = comments;
this.animals = animals;
this.users = users;
this.sanitizeService = sanitizeService;
}
示例13: ContentControllerBase
/// <summary>
/// Constructor
/// </summary>
/// <param name="log"></param>
/// <param name="localizationService"></param>
/// <param name="siteService"></param>
/// <param name="userService"></param>
/// <param name="contentItemService"></param>
/// <param name="contentItemServiceForPage"></param>
/// <param name="commentService"></param>
/// <param name="categoryService"></param>
/// <param name="tagService"></param>
/// <param name="searchService"></param>
/// <param name="widgetService"></param>
/// <param name="messageService"></param>
protected ContentControllerBase( ILog log,
ILocalizationService localizationService,
ISiteService siteService,
IUserService userService,
IContentItemService<Post> contentItemService,
IContentItemService<Page> contentItemServiceForPage,
ICommentService commentService,
ICategoryService categoryService,
ITagService tagService,
ISearchService searchService,
IWidgetService widgetService,
IMessageService messageService)
{
this.log = log;
this.localizationService = IoC.Resolve<ILocalizationService>();
this.userService = IoC.Resolve<IUserService>();
this.siteService = IoC.Resolve<ISiteService>();
this.categoryService = IoC.Resolve<ICategoryService>();
this.tagService = IoC.Resolve<ITagService>();
this.contentItemService = contentItemService;
this.contentItemServiceForPage = contentItemServiceForPage;
this.commentService = commentService;
this.searchService = searchService;
this.widgetService = widgetService;
this.messageService = messageService;
registeredWidgetComponents = new List<IWidgetComponent>();
currentCulture = Thread.CurrentThread.CurrentUICulture;
}
示例14: EntryController
public EntryController(IEntryService entryService, ICommentService commentService, IBlogService blogService, ITagService tagService)
{
_entryService = entryService;
_commentService = commentService;
_blogService = blogService;
_tagService = tagService;
}
示例15: PostController
public PostController(IPostService service, ITagService ts, ICommentService commentService, IUserService us)
{
this.postService = service;
this.tagService = ts;
this.userService = us;
this.commentService = commentService;
}