public void AccountSvcPingTest() { try { PingResult result = _accountSvc.Ping(""); foreach (Message message in result.Messages) { Console.WriteLine(message.Name + ": " + message.Summary); } Assert.AreEqual(SeverityLevel.Success, result.ResultCode); } catch (Exception ex) { Assert.Fail("AccountSvcPingTest failed: " + ex.Message + " : " + ex.StackTrace); } }
/// <summary> /// Stops the monitoring clock. /// </summary> public void Stop(AccountSvc svc, ref Proxies.AccountSvcProxy.ProxyUserFetchResult result) { _end = DateTime.Now; if (!_running) { throw new ApplicationException("An attempt was made to stop the performance timekeeper that was not running. Call the Start method prior to calling Stop method."); } try { if (Utilities.HasClientMetricMessage(result.Messages)) { //call Ping Method and send ClientMetric //Sample Entry - ClientMetrics:17849,ClientDuration,1500 svc.Ping(Utilities.BuildAuditMetrics("", result.TransactionId, _end.Subtract(_start).Milliseconds)); } } catch (Exception ex) { _avaLog.Error(string.Format("Error sending ClientMetrics: {0}", ex.Message)); } _running = false; }