public static IList <IFolder> GetFolderPath(this IHasFolder model, bool includePackage = true) { List <IFolder> result = new List <IFolder>(); var current = model.Folder; while (current != null && (includePackage || !current.IsPackage)) { result.Insert(0, current); current = current.ParentFolder; } return(result); }
public static IList <FolderModel> GetParentFolders(this IHasFolder model) { List <FolderModel> result = new List <FolderModel>(); var current = model.Folder; while (current != null) { result.Insert(0, current); current = current.Folder; } return(result); }
public static IList <IFolder> GetParentFolders(this IHasFolder <IFolder> model) { List <IFolder> result = new List <IFolder>(); IFolder current = model.Folder; while (current != null) { result.Insert(0, current); current = (current as IHasFolder <IFolder>)?.Folder; } return(result); }
public static IList <IFolder> GetFolderPath(this IHasFolder model) { List <IFolder> result = new List <IFolder>(); var current = model.Folder; while (!current.IsStatic) { result.Insert(0, current); current = current.ParentFolder; } return(result); }
public static IStereotype GetStereotypeInFolders(this IHasFolder model, string stereotypeName) { var folder = model.Folder; while (folder != null) { if (folder.HasStereotype(stereotypeName)) { return(folder.GetStereotype(stereotypeName)); } folder = folder.ParentFolder; } return(null); }
public static IList <string> GetParentFolderNames(this IHasFolder <IFolder> model) { return(model.GetParentFolders().Select(x => x.Name).Where(x => !string.IsNullOrWhiteSpace(x)).ToList()); }