private static void ParseProcessorDefinitions([NotNull] XmlNodeList processorNodes, [NotNull] List <ProcessorDefinition> processorDefinitions, XmlElement parentNode)
        {
            Assert.ArgumentNotNull(processorNodes, nameof(processorNodes));
            Assert.ArgumentNotNull(processorDefinitions, nameof(processorDefinitions));

            foreach (XmlElement processorElement in processorNodes.OfType <XmlElement>())
            {
                ProcessorDefinition definition = ParseProcessorDefinition(processorElement);

                var definitionNode = parentNode.AddElement("processor");
                definitionNode.SetAttribute("type", definition.Type.FullName);
                definitionNode.SetAttribute("title", definition.Title);
                definitionNode.SetAttribute("process", definition.ProcessAlways ? "always" : "once");
                definitionNode.SetAttribute("param", definition.Param);

                // add nested processor definitions
                ParseProcessorDefinitions(processorElement.ChildNodes, definition.NestedProcessorDefinitions, definitionNode);
                processorDefinitions.Add(definition);
            }
        }
 public override string ToString()
 {
     return(ProcessorDefinition.With(x => x.ToString()) ?? "(empty processor)");
 }
 public ProcessorHive(ProcessorDefinition parentDefinition)
 {
     Assert.ArgumentNotNull(parentDefinition, nameof(parentDefinition));
     this.ParentDefinition = parentDefinition;
 }