Пример #1
0
 public byte[] GetSharePointImageStream(string uri)
 {
     //
     byte[] image = null;
     Argix.Imaging.ImagingServiceClient client = null;
     try {
         client = new ImagingServiceClient();
         image  = client.GetSharePointImageStreamByUri(uri);
         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(image);
 }
Пример #2
0
        public MetaDatas GetMetaData()
        {
            //
            MetaDatas            metaData = null;
            ImagingServiceClient client   = null;

            try {
                client   = new ImagingServiceClient();
                metaData = client.GetMetaData();
                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(metaData);
        }
Пример #3
0
        public DocumentClasses GetDocumentClasses(string department)
        {
            //
            DocumentClasses      classes = null;
            ImagingServiceClient client  = null;

            try {
                client  = new ImagingServiceClient();
                classes = client.GetDocumentClassesByDepartment(department);
                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(classes);
        }
Пример #4
0
        public string GetPortalSearchInfo()
        {
            //
            string info = "";
            ImagingServiceClient client = null;

            try {
                client = new ImagingServiceClient();
                info   = client.GetPortalSearchInfo();
                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(info);
        }
Пример #5
0
        public byte[] GetSharePointImageStream(SearchRequest request)
        {
            //
            byte[] bytes = null;
            ImagingServiceClient client = null;

            try {
                client = new ImagingServiceClient();
                bytes  = client.GetSharePointImageStream(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(bytes);
        }
Пример #6
0
        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);
        }
Пример #7
0
        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);
        }