Пример #1
0
 public static void ForEach(this SPSiteCollection source, Action <SPSite> action)
 {
     source.AsSafeEnumerable().ForEach(action);
 }
Пример #2
0
 /// <summary>
 /// Returns a collection of <see cref="SPSite"/> objects that will be disposed by its <see cref="IEnumerator"/>.
 /// </summary>
 /// <param name="sites">The <see cref="SPSiteCollection"/> that contains the sites to enumerate.</param>
 /// <returns>An <see cref="IEnumerable{SPSite}"/> that will dispose each <see cref="SPSite"/> returned.</returns>
 public static IEnumerable <SPSite> AsSafeEnumerable(this SPSiteCollection sites)
 {
     return(sites.AsSafeEnumerable(null));
 }