public bool Equals(ParsedUrlPart obj)
    {
      if (ReferenceEquals(null, obj)) return false;
      if (ReferenceEquals(this, obj)) return true;

      if (_partName != obj._partName) return false;
      if (_parameters.Count != obj._parameters.Count) return false;

      return (_parameters.ElementsEqualInOrder(obj._parameters));
    }
Exemple #2
0
    public UrlNode(ParsedUrlPart part)
    {
      _name = part.PartName;
      if (string.IsNullOrEmpty(_name))
      {
        _name = "root";
      }

      FormatString = part.FormatString;
      _isOnlyParameter = part.IsOnlyParameter;
      _parameters = part.Parameters.Select(x => new Parameter(x, "object"));
      _children = new Dictionary<string, UrlNode>();
    }