Inheritance: CheckedNode
        public OperatorPackagesRoot LoadOperators()
        {
            var list = new List<PackageNode>();

            var root = new OperatorPackagesRoot("Root");

            IEnumerable<IOperatorsPackage> packages = _loader.ReloadOperators();
            foreach (IOperatorsPackage operatorsPack in packages)
            {
                var package = new PackageNode(root,operatorsPack);
                foreach (IMutationOperator mutationOperator in operatorsPack.Operators)
                {
                    var operatorNode = new OperatorNode(package,mutationOperator);
                    package.Children.Add(operatorNode);
                }
                root.Children.Add(package);
                list.Add(package);
            }
            root.IsIncluded = true;
            if(!root.Children.Any())
            {
                throw new InvalidOperationException("No mutation operators were found.");
            }
            return root;
        }
Example #2
0
 public OperatorNode(PackageNode parent, IMutationOperator mutationOperator)
     : base(mutationOperator.Info.Id+" - "+ mutationOperator.Info.Name)
 {
     Operator = mutationOperator;
     Parent = parent;
 }
Example #3
0
 public OperatorNode(PackageNode parent, IMutationOperator mutationOperator)
     : base(mutationOperator.Info.Id + " - " + mutationOperator.Info.Name)
 {
     Operator = mutationOperator;
     Parent   = parent;
 }