コード例 #1
0
        public AdminController(
            IOrchardServices orchardServices,
            IGraphManager graphManager,
            IUpdateQueueManager updaterService)
        {
            _orchardServices = orchardServices;
            _contentManager = orchardServices.ContentManager;
            _graphManager = graphManager;
            _updaterService = updaterService;

            T = NullLocalizer.Instance;
        }
コード例 #2
0
 public TagGraphUpdater(
     IDistributedLockManager lockManager,
     IUpdateQueueManager updaterQueueManager,
     ITagGraphManager tagGraphManager,
     ITagService tagService,
     IAssociativyServices associativyServices,
     IContentManager contentManager)
 {
     _lockManager = lockManager;
     _updaterQueueManager = updaterQueueManager;
     _tagGraphManager = tagGraphManager;
     _tagService = tagService;
     _associativyServices = associativyServices;
     _contentManager = contentManager;
 }
コード例 #3
0
        public TagsPartHandler(
            ITagService tagService,
            IUpdateQueueManager updaterService)
        {
            OnUpdated<TagsPart>(
                (context, part) =>
                {
                    // If a content type is not draftable OnPublished() will not run, therefore we do the same here.
                    // With draftables we only deal with tag nodes after publishing.
                    if (!context.ContentItem.Has<IPublishingControlAspect>() && !context.ContentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable)
                    {
                        updaterService.AddToQueue(context.ContentItem);
                    }
                });

            OnPublished<TagsPart>(
                (context, part) =>
                {
                    updaterService.AddToQueue(context.ContentItem);
                });
        }