public DateTime GetServiceStartTime() { try { IPreService proxy = CreateProxy(); return(proxy.GetServiceStartTime()); } catch (Exception e) { Logger.LogError("Error getting service start time", e); throw; } }
private void buttonGetServiceStartTime_Click(object sender, EventArgs e) { try { IPreService preService = GetPreProxy(); DateTime startTime = preService.GetServiceStartTime(); MessageBox.Show("Start time: " + startTime); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); Logger.LogError("Error getting pre service start time", ex); } }