protected void LogMapping(object variable, ODM2ConverterSourceLocation location) { string message = string.Format("{0}: Mapped as \"{1}\".", location, variable); LogInfo(message, location); PrintToConsole(message); }
private void LogError(string message, ODM2ConverterSourceLocation location) { var resultLevel = ResultLevel.ERROR; var result = new MappingResult(resultLevel, message, location); _iResults.Add(result); }
private void LogErrorIfNull(object variable, ODM2ConverterSourceLocation location) { if (variable == null) { string message = string.Format("{0}: Please specify a non-null value.", location); LogError(message, location); PrintToConsole(message); } }
public IEnumerable <IResult> Convert(ESDATModel model) { var action = Map(model); var resultLevel = ResultLevel.INFO; var location = new ODM2ConverterSourceLocation(this.ToString(), "Core.Action"); var message = string.Format("{0}: Core.Action is mappped.", location); var result = new ParsingResult(resultLevel, message, action, location); _iResults.Add(result); PrintToConsole(message); return(_iResults); }
protected void Validate(object variable, ODM2ConverterSourceLocation location) { LogErrorIfNull(variable, location); LogMapping(variable, location); }