Exemple #1
0
 public static GlobalCatalogCollection FindAll(DirectoryContext context, string siteName)
 {
     if (context != null)
     {
         if (context.ContextType == DirectoryContextType.Forest)
         {
             if (siteName != null)
             {
                 context = new DirectoryContext(context);
                 return(GlobalCatalog.FindAllInternal(context, siteName));
             }
             else
             {
                 throw new ArgumentNullException("siteName");
             }
         }
         else
         {
             throw new ArgumentException(Res.GetString("TargetShouldBeForest"), "context");
         }
     }
     else
     {
         throw new ArgumentNullException("context");
     }
 }
 public GlobalCatalogCollection FindAllGlobalCatalogs(string siteName)
 {
     this.CheckIfDisposed();
     if (siteName == null)
     {
         throw new ArgumentNullException("siteName");
     }
     return(GlobalCatalog.FindAllInternal(this.context, siteName));
 }
Exemple #3
0
        public GlobalCatalogCollection FindAllGlobalCatalogs()
        {
            CheckIfDisposed();

            return(GlobalCatalog.FindAllInternal(_context, null));
        }