public NavigationUrl Build(Action <NavigationUrlQuery> updateQuery = null) { var newQuery = new NavigationUrlQuery(url.Segments.Last().Query); var segments = new List <NavigationUrlSegment>(); for (int i = 0; i < this.url.Segments.Count(); i++) { var segment = this.url.Segments[i]; if (i == this.url.Segments.Length - 1) { segment = new NavigationUrlSegment(segment.Value, newQuery); } else { segment = new NavigationUrlSegment(segment.Value); } segments.Add(segment); } updateQuery?.Invoke(newQuery); var newUrl = new NavigationUrl(segments.ToArray()); return(newUrl); }
public NavigationUrlQuery(NavigationUrlQuery other) { foreach (var pair in other.parameters) { this.parameters[pair.Key] = pair.Value; } }
private NavigationUrlQueryParser(bool isSuccess, NavigationUrlQuery query) { this.isSuccess = isSuccess; this.query = query; }
public NavigationUrlQueryParser(NavigationUrlQuery query) : this(true, query) { }
public NavigationUrlSegment(string value, NavigationUrlQuery query) { this.Query = query; this.Value = value; }