Beispiel #1
0
 public override void Process(TemplateCheckArgs args)
 {
     Assert.ArgumentNotNull(args, "args");
     Assert.IsNotNull(args.ItemToCheck, "args.ItemToCheck");
     Assert.IsNotNull(InclusionList, "InclusionList");
     Assert.IsNotNull(ExclusionList, "ExcludedTemplates");
     args.TemplateIsValid = MeetsListSpecifications(args.ItemToCheck.TemplateID);
 }
        public override void Process(RefreshItemArgs args)
        {
            if (args == null || args.Item == null)
                return;

            var templateCheckArgs = new TemplateCheckArgs();
            templateCheckArgs.ItemToCheck = args.Item;
            CorePipeline.Run(PipelineNames.TemplateCheck, templateCheckArgs);

            if (!templateCheckArgs.TemplateIsValid)
                args.AbortPipeline();
        }
 public abstract void Process(TemplateCheckArgs args);
Beispiel #4
0
 private bool HasValidTemplate(Item item)
 {
     var templateCheckArgs = new TemplateCheckArgs(){ItemToCheck = item };
     CorePipeline.Run(PipelineNames.TemplateCheck, templateCheckArgs);
     return templateCheckArgs.TemplateIsValid;
 }