コード例 #1
0
        /// <summary>
        /// Re-indexes a content item whether published or not but only indexes them for indexes supporting unpublished content
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="isContentPublished">
        /// Value indicating whether the item is published or not
        /// </param>
        private static void ReIndexForContent(IContent sender, bool isContentPublished)
        {
            var actions = DeferedActions.Get(ApplicationContext.Current.ScopeProvider);

            if (actions != null)
            {
                actions.Add(new DeferedReIndexForContent(sender, isContentPublished));
            }
            else
            {
                DeferedReIndexForContent.Execute(sender, isContentPublished);
            }
        }
コード例 #2
0
        private void ReIndexForContent(IContent sender, bool isPublished)
        {
            var actions = DeferedActions.Get(_scopeProvider);

            if (actions != null)
            {
                actions.Add(new DeferedReIndexForContent(this, sender, isPublished));
            }
            else
            {
                DeferedReIndexForContent.Execute(this, sender, isPublished);
            }
        }
コード例 #3
0
        /// <inheritdoc />
        public void ReIndexForContent(IContent sender, bool isPublished)
        {
            var actions = DeferedActions.Get(_scopeProvider);

            if (actions != null)
            {
                actions.Add(new DeferedReIndexForContent(_backgroundTaskQueue, this, sender, isPublished));
            }
            else
            {
                DeferedReIndexForContent.Execute(_backgroundTaskQueue, this, sender, isPublished);
            }
        }