public ConfigurationRuleViolation AddNamedRoot(string name, LocalRoot node)
        {
            var namedRoot = new NamedRoot(name, node);

            if (namedRoots.TryGetValue(namedRoot.Name, out var conflict))
            {
                return(errors.Record(new DuplicateNamedRootDeclaration(namedRoot, conflict)));
            }
            if (!TryAddLocalRoot(node, null, out var violation))
            {
                return(errors.Record(violation));
            }
            namedRoots.Add(namedRoot.Name, namedRoot);
            return(null);
        }
示例#2
0
 public AbstractPath(NamedRoot root, RelativePath relativePath)
 {
     Root         = root;
     RelativePath = relativePath;
 }