public void ReplaceTags(Guid entityId, string collectionString) { var tagIds = collectionString.ParseStringCollection(Guid.Parse).ToList(); var tags = _userTagProvider.Get(tagIds); _userTagService.Replace(entityId, tagIds); _userTagIndex.Update(entityId, tags.Select(t => t.Text)); }
public void ProcessContentPublished(IPublishingStrategy sender, PublishEventArgs <IContent> args) { var contentPagesWithTags = ParseUserTags(args.PublishedEntities); foreach (var(_, tagIds, entityId) in contentPagesWithTags) { _userTagService.Replace(entityId, tagIds); } }