protected virtual bool IsDuplicate(IRoutePart part) { object otherMethodObj; part.RouteData.TryGetValue(Routes.RouteData.RequiredHttpMethodKey, out otherMethodObj); var otherMethod = (string)otherMethodObj; bool result = (RequiredHttpMethod == null && otherMethod == null) || RequiredHttpMethod == otherMethod; return(result); }
protected override bool IsDuplicate(IRoutePart part) { return(base.IsDuplicate(part) && (part is RouteLiteral && ((RouteLiteral)part).IsTerminal ? ((RouteLiteral)part).Literal == Literal && IsTerminal : part is RouteVariable && ((RouteVariable)part).IsTerminal)); }
public RouteNode(IRoutePart part) { Part = part; Children = new List<RouteNode>(); }
public void Add(IRoutePart part) { parts.Add(part); }
public RouteNode(IRoutePart part) { Part = part; Children = new List <RouteNode>(); }
protected override bool IsDuplicate(IRoutePart part) { return(part is RouteDefault); }