Exemplo n.º 1
0
        public static UserConfiguration GetUserConfiguration(string application, string[] usernames)
        {
            //Get the operating enterprise terminal
            UserConfiguration config = null;

            try {
                _Client = new TLViewerServiceClient();
                config  = _Client.GetUserConfiguration(application, usernames);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetUserConfiguration() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() communication error.", ce); }
            return(config);
        }
Exemplo n.º 2
0
        public static UserConfiguration GetUserConfiguration(string application, string[] usernames)
        {
            //Get the operating enterprise terminal
            UserConfiguration     config = null;
            TLViewerServiceClient client = null;

            try {
                client = new TLViewerServiceClient();
                config = client.GetUserConfiguration(application, usernames);
                client.Close();
            }
            catch (TimeoutException te) { client.Abort(); throw new ApplicationException(te.Message, te); }
            catch (FaultException fe) { client.Abort(); throw new ApplicationException(fe.Message, fe); }
            catch (CommunicationException ce) { client.Abort(); throw new ApplicationException(ce.Message, ce); }
            return(config);
        }