Beispiel #1
0
        public SPOList GetParentList(bool detailed)
        {
            if (detailed && _detailedParentList != null)
            {
                return(_detailedParentList);
            }
            if (!detailed && _basicParentList != null)
            {
                return(_basicParentList);
            }

            if (detailed && _detailedParentList == null)
            {
                SPOList.LoadList(SPOSiteContext.CurrentSiteContext.Context, _item.ParentList, true);
                _detailedParentList = new SPOList(_item.ParentList);
                _basicParentList    = _detailedParentList;
                return(_detailedParentList);
            }
            else if (!detailed && _basicParentList == null)
            {
                SPOList.LoadList(SPOSiteContext.CurrentSiteContext.Context, _item.ParentList, false);
                _basicParentList = new SPOList(_item.ParentList);
                return(_basicParentList);
            }
            return(null);
        }
 public SPOListPipeBind(SPOList spoList)
 {
     if ((spoList == null) || spoList.Id == Guid.Empty)
     {
         throw new ArgumentNullException("The List ID must be specified.");
     }
     _listId = spoList.Id;
     _list = spoList.List;
 }
 public void AddFieldLinks(SPOList list, params string[] fieldsToAdd)
 {
     AddFieldLinks(list.List.ParentWeb.AvailableFields, true, fieldsToAdd);
 }
 public static SPOWikiPage AddWikiPage(SPOList list, string wikiPageName)
 {
     return AddWikiPage(list, wikiPageName, false);
 }
 internal static SPOWikiPage AddWikiPage(SPOList list, string wikiPageName, bool throwIfExists)
 {
     var folder = list.GetRootFolder(true);
     return AddWikiPage(folder, wikiPageName, throwIfExists);
 }
Beispiel #6
0
        internal static SPOWikiPage AddWikiPage(SPOList list, string wikiPageName, bool throwIfExists)
        {
            var folder = list.GetRootFolder(true);

            return(AddWikiPage(folder, wikiPageName, throwIfExists));
        }
Beispiel #7
0
 public static SPOWikiPage AddWikiPage(SPOList list, string wikiPageName)
 {
     return(AddWikiPage(list, wikiPageName, false));
 }
Beispiel #8
0
        internal static SPOWikiPage AddWikiPage(SPOWeb web, string wikiPageLibraryUrlOrTitle, string wikiPageName, bool throwIfExists)
        {
            SPOList list = web.GetList(wikiPageLibraryUrlOrTitle, false);

            return(AddWikiPage(list, wikiPageName, throwIfExists));
        }