WebFolderInfo CreateWebFolderInfo(WebInfo web, string path) { var folder = new WebFolderInfo(web, path); folder.Title = ""; FinalizeInfo(folder); return(folder); }
ListInfo GetList(WebFolderInfo folder, string name) { // Web folders are artificial objects that cannot be queried by the SharePoint object // model. They can contain only lists and because all lists on a web can be obtained // we can look for the particular list with a relative path combined from the folder // and the list names. name = PathUtility.JoinPath(folder.Name, name); var list = GetAllLists(folder.Web).FirstOrDefault(item => item.WebRelativePath.EqualsCI(name)); if (list == null) { throw new ApplicationException("No list found."); } return(list); }
ListInfo GetList(WebFolderInfo folder, string name) { // Web folders are artificial objects that cannot be queried by the SharePoint object // model. They can contain only lists and because all lists on a web can be obtained // we can look for the particular list with a relative path combined from the folder // and the list names. name = PathUtility.JoinPath(folder.Name, name); var list = GetAllLists(folder.Web).FirstOrDefault(item => item.WebRelativePath.EqualsCI(name)); if (list == null) throw new ApplicationException("No list found."); return list; }
WebFolderInfo CreateWebFolderInfo(WebInfo web, string path) { var folder = new WebFolderInfo(web, path); folder.Title = ""; FinalizeInfo(folder); return folder; }