public CheckConnectionReplyType CheckConnection(CheckConnectionReplyType parameter) { CheckConnectionReplyType reply = null; try { reply = new CheckConnectionReplyType(); reply.Originator = new Uri("urn:publicid:" + System.Environment.UserDomainName.ToString()); reply.FeedIdentifier = parameter.FeedIdentifier; reply.SystemName = System.Environment.MachineName.ToString(); reply.DateTimeCreated = DateTime.Now; } catch (Exception e) { try { EventLog.WriteEntry(eventSource, "Could not create reply:" + e.Message, EventLogEntryType.Error); } catch (Exception eEventLog) { Exception eEventLogThrow = new Exception("Cannot write to event log: Check service permissions and EventSource exists", eEventLog); throw eEventLogThrow; } Exception eThrow = null; if (parameter == null) { eThrow = new Exception("Parameter is null", e); } else { eThrow = new Exception("Could not create reply", e); } throw (eThrow); } return(reply); }
public CheckConnectionReplyType CheckConnection(CheckConnectionReplyType parameter) { CheckConnectionReplyType reply = null; try { reply = new CheckConnectionReplyType(); reply.Originator = new Uri("urn:publicid:" + System.Environment.UserDomainName.ToString()); reply.FeedIdentifier = parameter.FeedIdentifier; reply.SystemName = System.Environment.MachineName.ToString(); reply.DateTimeCreated = DateTime.Now; } catch (Exception e) { try { EventLog.WriteEntry(eventSource, "Could not create reply:" + e.Message, EventLogEntryType.Error); } catch (Exception eEventLog) { Exception eEventLogThrow = new Exception("Cannot write to event log: Check service permissions and EventSource exists", eEventLog); throw eEventLogThrow; } Exception eThrow = null; if (parameter == null) { eThrow = new Exception("Parameter is null", e); } else { eThrow = new Exception("Could not create reply", e); } throw (eThrow); } return reply; }