public void NavigateBothTreesUp() { if (GoogleStack.Count <= 1 || LocalStack.Count <= 1) { Console.WriteLine($"Cannot go UP in {(GoogleStack.Count <= 1 ? "Google" : "Local or both")}"); } else { GoogleStack.Pop(); LocalStack.Pop(); } }
public void NavigateBothTreesDown(string nodeName) { if (GoogleStack.Peek() == null || LocalStack.Peek() == null) { Console.WriteLine($"Skip searching because current root doesn't exist in {(GoogleStack.Peek() == null ? "Google" : "Local or both")}"); } else { var googleNode = FindFolderInGoogle(nodeName); GoogleStack.Push(googleNode); var localNode = FindFolderLocally(nodeName); LocalStack.Push(localNode); } }
public INode GetCurrentGoogleNode() { return(GoogleStack.Peek()); }