public InterfaceTracingStatusResult Execute() { ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings[schemaName]; string connectionString = settings.ConnectionString; ITracingDao tracingDao = PolicyInjection.Create <TracingDao, ITracingDao>(connectionString); IList <CheckInterfaceTracingResult> resultList = null; resultList = tracingDao.CheckInterfaceTracing(new CheckInterfaceTracingParameters()); InterfaceTracingStatusResult result = new InterfaceTracingStatusResult(); if (resultList != null && resultList.Count > 0) { if (resultList[0].LoggOn) { result.LoggIsOn = true; result.LoggStops = resultList[0].LoggStarted.AddSeconds(resultList[0].LoggInterval); } else { result.LoggIsOn = false; result.LoggStops = null; } } return(result); }
public GetInterfaceTracingResponse GetInterfaceTracingStatus() { InterfaceTracingStatusAction action = PolicyInjection.Create <InterfaceTracingStatusAction>(); InterfaceTracingStatusResult businessResult = action.Execute(); GetInterfaceTracingResponse response = new GetInterfaceTracingResponse(); if (businessResult != null) { response.GetInterfaceTracingResult = Translators.GetInterfaceTracingTranslator.TranslateFromBusinessToService(businessResult); } return(response); }