public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal LTLService2Client client = null; try { client = new LTLService2Client(); client.WriteLogEntry(m); 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); } }
public static ServiceInfo GetServiceInfo() { //Get the operating enterprise terminal ServiceInfo terminal = null; LTLService2Client client = null; try { client = new LTLService2Client(); terminal = client.GetServiceInfo(); 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(terminal); }
public static UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get the operating enterprise terminal UserConfiguration config = null; LTLService2Client client = null; try { client = new LTLService2Client(); 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); }