public DataSet SearchSharePointImageStore(SearchRequest request) { // DataSet response = null; ImagingServiceClient client = null; try { client = new ImagingServiceClient(); response = client.SearchSharePointImageStore(request); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <EnterpriseFault> ef) { client.Abort(); throw new ApplicationException(ef.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(response); }
public DataSet SearchSharePointImageStore(string docClass, string propertyName, string searchText) { // DataSet results = null; Argix.Imaging.ImagingServiceClient client = null; try { client = new ImagingServiceClient(); SearchRequest request = new SearchRequest(); request.ScopeName = "All Sites"; request.MaxResults = 100; request.DocumentClass = docClass; request.PropertyName = propertyName; request.PropertyValue = searchText; results = client.SearchSharePointImageStore(request); client.Close(); } catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <EnterpriseFault> ef) { client.Abort(); throw new ApplicationException(ef.Detail.Message); } catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message); } return(results); }