Esempio n. 1
0
		public override DirectoryObject[] GetDirectoryObjectsBySearchCriteria(SearchCriteria[] searchCriteria) {
			if(searchCriteria == null) {
				throw new ArgumentNullException("searchCriteria");
			}
			WebService.SearchCriteria[] wsSearchCriteria = new WebService.SearchCriteria[searchCriteria.Length];
			for(int i = 0; i < searchCriteria.Length; i++) {
				WebService.SearchCriteria wsSC = new WebService.SearchCriteria();
				wsSC.Name = searchCriteria[i].Name;
				wsSC.Value = searchCriteria[i].Value;
				wsSC.Required = searchCriteria[i].Required;
				wsSearchCriteria[i] = wsSC;
			}
			WebService.DirectoryObject[] wsDirectoryObjects = this.GetWebService().GetDirectoryEntriesBySearchCriteria(wsSearchCriteria);
			DirectoryObject[] directoryObjects = new DirectoryObject[wsDirectoryObjects.Length];
			for(int i = 0; i < wsDirectoryObjects.Length; i++) {
				WebService.DirectoryObject wsDirectoryObject = wsDirectoryObjects[i];
				directoryObjects[i] = ConvertWSDirectoryObject(wsDirectoryObject);
			}
			return directoryObjects;
		}
Esempio n. 2
0
 public override DirectoryObject[] GetDirectoryObjectsBySearchCriteria(SearchCriteria[] searchCriteria)
 {
     if (searchCriteria == null)
     {
         throw new ArgumentNullException("searchCriteria");
     }
     WebService.SearchCriteria[] wsSearchCriteria = new WebService.SearchCriteria[searchCriteria.Length];
     for (int i = 0; i < searchCriteria.Length; i++)
     {
         WebService.SearchCriteria wsSC = new WebService.SearchCriteria();
         wsSC.Name           = searchCriteria[i].Name;
         wsSC.Value          = searchCriteria[i].Value;
         wsSC.Required       = searchCriteria[i].Required;
         wsSearchCriteria[i] = wsSC;
     }
     WebService.DirectoryObject[] wsDirectoryObjects = this.GetWebService().GetDirectoryEntriesBySearchCriteria(wsSearchCriteria);
     DirectoryObject[]            directoryObjects   = new DirectoryObject[wsDirectoryObjects.Length];
     for (int i = 0; i < wsDirectoryObjects.Length; i++)
     {
         WebService.DirectoryObject wsDirectoryObject = wsDirectoryObjects[i];
         directoryObjects[i] = ConvertWSDirectoryObject(wsDirectoryObject);
     }
     return(directoryObjects);
 }