Example #1
0
 public ExecutionLog CreateDTOFromExecutionLog(CollectExecutionLog executionLog)
 {
     var executionLogDTO = new ExecutionLog();
     executionLogDTO.Date = executionLog.Date;
     executionLogDTO.LogType = executionLog.Type.ToString();
     executionLogDTO.Message = executionLog.Message;
     return executionLogDTO;
 }
Example #2
0
        private CollectExecutionLog CreateExecutionLog(DateTime date, string message, LogType type)
        {
            CollectExecutionLog executionLog = new CollectExecutionLog();

            executionLog.Date    = date;
            executionLog.Message = message;
            executionLog.Type    = type;
            return(executionLog);
        }
Example #3
0
        private void SetExecutionLog(IEnumerable <ProbeLogItem> probeLogs, ProbeExecution probeExecution)
        {
            foreach (ProbeLogItem logItem in probeLogs)
            {
                if (logItem == null)
                {
                    continue;
                }

                try
                {
                    LogType             type         = (LogType)Enum.Parse(typeof(LogType), logItem.Type.ToString(), true);
                    CollectExecutionLog executionLog = CreateExecutionLog(logItem.Date, logItem.Message, type);
                    probeExecution.ExecutionLogs.Add(executionLog);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
Example #4
0
 private CollectExecutionLog CreateExecutionLog(DateTime date, string message, LogType type)
 {
     CollectExecutionLog executionLog = new CollectExecutionLog();
     executionLog.Date = date;
     executionLog.Message = message;
     executionLog.Type = type;
     return executionLog;
 }