protected private Web GetWorkingWeb() { if (MyInvocation.BoundParameters.ContainsKey("InputObject")) { if (!((Web)this.InputObject.ShowOriginal()).Lists.AreItemsAvailable) { this.InputObject.LoadProperty("Lists"); } return(this.InputObject.ShowOriginal() as Web); } else if (MyInvocation.BoundParameters.ContainsKey("Web")) { if (!this.Web.Lists.AreItemsAvailable) { CTX.Lae(this.Web.Lists); } return(this.Web); } else { if (!CTX.SP1.Web.Lists.AreItemsAvailable) { CTX.Lae(CTX.SP1.Web.Lists); } return(CTX.SP1.Web); } }
protected private SPListCollection GetAllLists(Web web) { var tempCol = web.Lists; if (!tempCol.AreItemsAvailable) { CTX.Lae(tempCol, true); } return((SPListCollection)tempCol); }