本文整理汇总了C#中ICommentService类的典型用法代码示例。如果您正苦于以下问题:C# ICommentService类的具体用法?C# ICommentService怎么用?C# ICommentService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICommentService类属于命名空间,在下文中一共展示了ICommentService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:andy135,项目名称:PracticaMaD,代码行数:33,代码来源:ModifyComment.aspx.cs
示例2: ProductDetails
static ProductDetails() {
IUnityContainer container =
(IUnityContainer)HttpContext.Current.Application["unityContainer"];
productService = container.Resolve<IProductService>();
commentService = container.Resolve<ICommentService>();
}
开发者ID:flanciskinho,项目名称:FIC.EI.IS.Net.Miniportal,代码行数:7,代码来源:ProductDetails.aspx.cs
示例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;
}
开发者ID:aozora,项目名称:arashi,代码行数:7,代码来源:AdminCommentController.cs
示例4: PostController
public PostController(DbContext dbContext, IPostService postService, ICommentService commentService, IPagingHandler<Post> pagingHandler)
: base(dbContext)
{
this._postService = postService;
_commentService = commentService;
_pagingHandler = pagingHandler;
}
开发者ID:cuongtranba,项目名称:PersonalBlog,代码行数:7,代码来源:PostController.cs
示例5: CommentController
public CommentController(IOrchardServices services, ICommentService commentService, INotifier notifier)
{
Services = services;
_commentService = commentService;
_notifier = notifier;
T = NullLocalizer.Instance;
}
开发者ID:stack72,项目名称:GiveCamp-London,代码行数:7,代码来源:CommentController.cs
示例6: CommentController
public CommentController(ICommentMapper commentMapper, IImageAlbumService imageAlbumService, ICommentService commentService, IMembershipService membershipService)
{
this._commentMapper = commentMapper;
this._imageAlbumService = imageAlbumService;
this._commentService = commentService;
this._membershipService = membershipService;
}
开发者ID:RamanBut-Husaim,项目名称:TermWork-SignalRChat,代码行数:7,代码来源:CommentController.cs
示例7: CommentsController
public CommentsController(IUsersService users, ICommentService comments, IHomeService homes, INeedService needs)
: base(users)
{
this.comments = comments;
this.homes = homes;
this.needs = needs;
}
开发者ID:AdrianApostolov,项目名称:GiftBox,代码行数:7,代码来源:CommentsController.cs
示例8: ChatApiController
public ChatApiController(IUserService service, IChatService service2, ICommentService service3, ILiveChat service4)
{
this._userService = service;
this._chatService = service2;
this._commentService = service3;
this._LiveChat = service4;
}
开发者ID:thedevhunter,项目名称:MiDinero-MiFuturo,代码行数:7,代码来源:ChatApiController.cs
示例9: ArticleController
public ArticleController(IBlogService blogService, IArticleService articleService, ITagService tagService, ICommentService commentService)
{
_blogService = blogService;
_articleService = articleService;
_tagService = tagService;
_commentService = commentService;
}
开发者ID:gewandt,项目名称:PersonalBlog,代码行数:7,代码来源:ArticleController.cs
示例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);
}
});
}
开发者ID:kyletowb,项目名称:InfusionDocs,代码行数:34,代码来源:CommentsPartHandler.cs
示例11: BlogImportRepository
public BlogImportRepository(ISubtextContext context, ICommentService commentService, IEntryPublisher entryPublisher, IBlogMLImportMapper mapper)
{
SubtextContext = context;
CommentService = commentService;
EntryPublisher = entryPublisher;
Mapper = mapper;
}
开发者ID:ChrisPelatari,项目名称:SubText,代码行数:7,代码来源:BlogImportRepository.cs
示例12: CommentsController
public CommentsController(ICommentService comments, IAnimalService animals, IUserService users, ISanitizer sanitizeService)
{
this.comments = comments;
this.animals = animals;
this.users = users;
this.sanitizeService = sanitizeService;
}
开发者ID:PavDragneva,项目名称:ChooseMe,代码行数:7,代码来源:CommentsController.cs
示例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;
}
开发者ID:aozora,项目名称:arashi,代码行数:45,代码来源:ContentControllerBase.cs
示例14: EntryController
public EntryController(IEntryService entryService, ICommentService commentService, IBlogService blogService, ITagService tagService)
{
_entryService = entryService;
_commentService = commentService;
_blogService = blogService;
_tagService = tagService;
}
开发者ID:nancy-bree,项目名称:Bloghost,代码行数:7,代码来源:EntryController.cs
示例15: PostController
public PostController(IPostService service, ITagService ts, ICommentService commentService, IUserService us)
{
this.postService = service;
this.tagService = ts;
this.userService = us;
this.commentService = commentService;
}
开发者ID:Dharshz,项目名称:Tales-Blog,代码行数:7,代码来源:PostController.cs
示例16: HasCommentsHandler
public HasCommentsHandler(
IContentManager contentManager,
IRepository<HasCommentsRecord> hasCommentsRepository,
ICommentService commentService) {
Filters.Add(StorageFilter.For(hasCommentsRepository));
OnActivated<HasComments>((ctx, x) => {
x.CommentsActive = true;
x.CommentsShown = true;
});
OnLoading<HasComments>((context, comments) => {
comments._comments.Loader(list => contentManager
.Query<Comment, CommentRecord>()
.Where(x => x.CommentedOn == context.ContentItem.Id && x.Status == CommentStatus.Approved)
.List().ToList());
comments._pendingComments.Loader(list => contentManager
.Query<Comment, CommentRecord>()
.Where(x => x.CommentedOn == context.ContentItem.Id && x.Status == CommentStatus.Pending)
.List().ToList());
});
OnRemoved<HasComments>(
(context, c) => {
foreach (var comment in commentService.GetCommentsForCommentedContent(context.ContentItem.Id)) {
contentManager.Remove(comment.ContentItem);
}
});
}
开发者ID:mofashi2011,项目名称:orchardcms,代码行数:31,代码来源:HasCommentsHandler.cs
示例17: CommentTokens
public CommentTokens(
IContentManager contentManager,
ICommentService commentService) {
_contentManager = contentManager;
_commentService = commentService;
T = NullLocalizer.Instance;
}
开发者ID:anycall,项目名称:Orchard,代码行数:7,代码来源:CommentTokens.cs
示例18: CommentPartHandler
public CommentPartHandler(
IRepository<CommentPartRecord> commentsRepository,
IContentManager contentManager,
ICommentService commentService
) {
Filters.Add(StorageFilter.For(commentsRepository));
OnLoading<CommentPart>((context, comment) => {
comment.CommentedOnContentItemField.Loader(
item => contentManager.Get(comment.CommentedOn)
);
comment.CommentedOnContentItemMetadataField.Loader(
item => contentManager.GetItemMetadata(comment.CommentedOnContentItem)
);
});
OnRemoving<CommentPart>((context, comment) => {
foreach(var response in contentManager.Query<CommentPart, CommentPartRecord>().Where(x => x.RepliedOn == comment.Id).List()) {
contentManager.Remove(response.ContentItem);
}
});
// keep CommentsPart.Count in sync
OnPublished<CommentPart>((context, part) => commentService.ProcessCommentsCount(part.CommentedOn));
OnUnpublished<CommentPart>((context, part) => commentService.ProcessCommentsCount(part.CommentedOn));
OnVersioned<CommentPart>((context, part, newVersionPart) => commentService.ProcessCommentsCount(newVersionPart.CommentedOn));
OnRemoved<CommentPart>((context, part) => commentService.ProcessCommentsCount(part.CommentedOn));
OnIndexing<CommentPart>((context, commentPart) => context.DocumentIndex
.Add("commentText", commentPart.Record.CommentText));
}
开发者ID:SunRobin2015,项目名称:RobinWithOrchard,代码行数:33,代码来源:CommentPartHandler.cs
示例19: ArticleController
public ArticleController(IUserService service, IBlogService blogService,
IArticleService articleService, ICommentService commentService)
{
_userService = service;
_blogService = blogService;
_articleService = articleService;
_commentService = commentService;
}
开发者ID:opolkosergey,项目名称:Blog.ASP.Net.Opolko,代码行数:8,代码来源:ArticleController.cs
示例20: AdministratorController
public AdministratorController(IBlogService blogService, IEntryService entryService, IUserService userService, ITagService tagService, ICommentService commentService)
{
_blogService = blogService;
_entryService = entryService;
_userService = userService;
_tagService = tagService;
_commentService = commentService;
}
开发者ID:nancy-bree,项目名称:Bloghost,代码行数:8,代码来源:AdministratorController.cs
注:本文中的ICommentService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论