public bool Navigate <T>(T page) { if (!typeof(T).IsEnum) { throw new ArgumentException("T must be an enumerated type"); } return(Navigate(new Uri(AttributeFacade.AppPagePath(page), UriKind.Relative))); }
public bool Navigate <T>(T page, params Extensions.Tuple <string, string>[] navigationParams) { if (!typeof(T).IsEnum) { throw new ArgumentException("T must be an enumerated type"); } var endpoint = AttributeFacade.AppPagePath(page); var uri = string.Format("{0}{1}" , endpoint , (navigationParams == null || navigationParams.Count() == 0) ? "" : navigationParams .Aggregate <Tuple <string, string>, string>( endpoint.Contains("?") ? "&" : "?" , (s, t) => s + t.TupleToArg() + "&") .TrimEnd('&')); return(Navigate(new Uri(uri, UriKind.Relative))); }