//============================================================ // <T>获取层级目录集合。</T> // // @return 目录集合 //============================================================ public FObjects <FCfgFolder> FetchFolderStack(bool constainsSelf = true) { FObjects <FCfgFolder> stack = new FObjects <FCfgFolder>(); FCfgFolder find = this; while (find != null) { if (constainsSelf) { stack.Push(find); } else if (find != this) { stack.Push(find); } find = find.Parent; } stack.Reverse(); return(stack); }