Exemple #1
0
        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));
        }
Exemple #2
0
        public void ProcessContentPublished(IPublishingStrategy sender, PublishEventArgs <IContent> args)
        {
            var contentPagesWithTags = ParseUserTags(args.PublishedEntities);

            foreach (var(_, tagIds, entityId) in contentPagesWithTags)
            {
                _userTagService.Replace(entityId, tagIds);
            }
        }