Exemplo n.º 1
0
    private void AddUrl(ParsedUrl url)
    {
      var currentNode = _root;

      foreach (var part in url.Parts)
      {
        if (!currentNode.HasChildNamed(part.PartName))
        {
          var child = new UrlNode(part);
          currentNode.AddChild(child);
        }

        currentNode = currentNode.GetChild(part.PartName);
      }

      currentNode.Url = url;
    }