private void BuildFolderForObject(IFolderObject obj) { var folderStrings = obj.GetDisplayFolder(Culture).Split(';').Distinct(StringComparer.InvariantCultureIgnoreCase); foreach (var folderString in folderStrings) { var folder = Folder.CreateFolder(obj.Table, folderString); folder.Children.Add(obj); } }
public static Folder GetFolder(this IFolderObject folderObject, Culture culture) { var df = folderObject.GetDisplayFolder(culture); if (df == null) { return(null); } Folder folder; return(folderObject.Table.FolderCache.TryGetValue(df, out folder) ? folder : null); }
public static bool HasAncestor(this IFolderObject child, ITabularNamedObject ancestor, Culture culture) { string ancestorPath = GetFullPath(ancestor); return((child.Table.Name.ConcatPath(child.GetDisplayFolder(culture)) + "\\").StartsWith(ancestorPath + "\\")); }
public static bool HasParent(this IFolderObject child, ITabularNamedObject parent, Culture culture) { string parentPath = GetFullPath(parent); return(child.Table.Name.ConcatPath(child.GetDisplayFolder(culture)) == parentPath); }
private void BuildFolderForObject(IFolderObject obj) { var folder = Folder.CreateFolder(obj.Table, obj.GetDisplayFolder(Culture)); folder.Children.Add(obj); }