Example #1
0
        WebFolderInfo CreateWebFolderInfo(WebInfo web, string path)
        {
            var folder = new WebFolderInfo(web, path);

            folder.Title = "";
            FinalizeInfo(folder);
            return(folder);
        }
Example #2
0
        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);
        }
Example #3
0
 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;
 }
Example #4
0
 WebFolderInfo CreateWebFolderInfo(WebInfo web, string path)
 {
     var folder = new WebFolderInfo(web, path);
     folder.Title = "";
     FinalizeInfo(folder);
     return folder;
 }