public void Process(SynchronizeTreeArgs args)
        {
            Assert.ArgumentNotNull(args, "args");

            if (!this.IsIntegration)
            {
                args.AbortPipeline();
            }

            if (!args.Options.IsEvent)
            {
                this.eventManager.QueueEvent(new ProcessTreeRemoteEvent(args.Context.ParentID, args.Context.Database.Name));
            }
        }
        public void Process(SynchronizeTreeArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.IsNotNull(args.Context, "Value can't be null: args.Context");

            // TODO: Find way to cover disabler with unit tests.
            using (new IntegrationDisabler())
            {
                var parent = args.Context.ParentItem;
                while (parent != null && (parent.TemplateID == TemplateIDs.IntegrationConfig || parent.TemplateID == TemplateIDs.IntegrationFolder))
                {
                    if (!new IntegrationItem(parent).IsActive)
                    {
                        args.AbortPipeline();
                        break;
                    }

                    parent = parent.Parent;
                }
            }
        }