public bool TryUp()
{
if (CurrentPath == null)
{
return false;
}
if (CurrentPath.IndexOf('/') < 0)
{
if(routes.ContainsKey("*") == false)
{
return false;
}
else
{
Navigate("*");
return true;
}
}
else
{
var newPath = CurrentPath.Substring(0, CurrentPath.LastIndexOf('/'));
Page p;
if(TryResolveRoute(ref newPath, out p))
{
Push(newPath, p);
return true;
}
else
{
return false;
}
}
}