source

13 Results / Page 2 of 2

todayOctober 9, 2018

  • 8
  • 3
close

SharePoint Development Owner

Enumerating All SPWebs In SPFarm.Local Into Strongly Typed Collection

So when enumerating the SPWebs within a SPFarm to build a strongly typed SPWeb collection for whatever purpose your enumeration might look like this: [csharp] public static List WebsPreppedForIteration() { var collection = new List(); foreach (SPSite x in SPFarm.Local.Services.OfType().SelectMany (svc => ((svc).WebApplications.Where (webApp => !webApp.Properties.ContainsKey(“Microsoft.Office.Server.SharedResourceProvider”)).SelectMany (webApp => webApp.Sites.Cast()))).Where (x ...