public PathBranch FindOrAddChildByToken(RouteToken token) { var key = GetKey(token); var pathBranch = FindChild(key); if (pathBranch != null) { return(pathBranch); } pathBranch = new PathBranch { Token = token }; ChildrenDict[key] = pathBranch; return(pathBranch); }
private static string GetKey(RouteToken token) => token.Text ?? Utils.ComputeHash(token.Hasher);
public PathBranch FindChild(RouteToken token) => FindChild(GetKey(token));
public RouteTokenHasher(RouteToken token) => _token = token;