示例#1
0
 static IEnumerable <IClickableMenu> GetAncestors(IClickableMenu menu)
 {
     for (; menu != null; menu = menu.GetParentMenu())
     {
         yield return(menu);
     }
 }