/// <summary> /// Creates a probe execution with error status. /// This is necessary because in the execution of the collect, can be happen an /// error and should be possible to track the error. /// </summary> /// <param name="capability">The capability.</param> /// <param name="errorMessage">The error message.</param> /// <returns></returns> public ProbeExecution CreateAProbeExecutionWithError(string capability, string errorMessage) { ProbeExecution probe = new ProbeExecution(); probe.Capability = capability; probe.ExecutionLogs.Add(this.CreateExecutionLog(DateTime.Now, errorMessage, LogType.Error)); return probe; }
public ProbeExecution CreateAProbeExecution(ProbeResult probeResult, string capability) { ProbeExecution probe = new ProbeExecution(); probe.Capability = capability; this.SetExecutionLog(probeResult.ExecutionLog, probe); return probe; }
/// <summary> /// Create a probe execution with error status and detail log entries, provided by LogEntries parameter; /// </summary> /// <param name="p">The probe capabality</param> /// <param name="iEnumerable">the set of log entries.</param> /// <returns></returns> public ProbeExecution CreateAProbeExecutionWithError(string capability, IEnumerable <ProbeLogItem> logEntries) { ProbeExecution probe = new ProbeExecution(); probe.Capability = capability; this.SetExecutionLog(logEntries, probe); return(probe); }
/// <summary> /// Creates a probe execution with error status. /// This is necessary because in the execution of the collect, can be happen an /// error and should be possible to track the error. /// </summary> /// <param name="capability">The capability.</param> /// <param name="errorMessage">The error message.</param> /// <returns></returns> public ProbeExecution CreateAProbeExecutionWithError(string capability, string errorMessage) { ProbeExecution probe = new ProbeExecution(); probe.Capability = capability; probe.ExecutionLogs.Add(this.CreateExecutionLog(DateTime.Now, errorMessage, LogType.Error)); return(probe); }
public ProbeExecution CreateAProbeExecution(ProbeResult probeResult, string capability) { ProbeExecution probe = new ProbeExecution(); probe.Capability = capability; this.SetExecutionLog(probeResult.ExecutionLog, probe); return(probe); }
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; } } }
/// <summary> /// Create a probe execution with error status and detail log entries, provided by LogEntries parameter; /// </summary> /// <param name="p">The probe capabality</param> /// <param name="iEnumerable">the set of log entries.</param> /// <returns></returns> public ProbeExecution CreateAProbeExecutionWithError(string capability, IEnumerable<ProbeLogItem> logEntries) { ProbeExecution probe = new ProbeExecution(); probe.Capability = capability; this.SetExecutionLog(logEntries, probe); return probe; }
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; } } }
public ProbeExecution CreateProbeExecution(IDocumentSession session, string capability) { ProbeExecution registryProbe = new ProbeExecution() { Capability = capability, }; return registryProbe; }