protected void WriteLogMessage() { Console.WriteLine("[" + _Status + "] " + Name + " [" + ElapsedTime.ToString() + "sec]"); if (Status == Status_t.Fail) { if (StdOut.Length > 0) { Console.WriteLine(StringManip.IndentText(StdOut.ToString(), 4)); } if (StdErr.Length > 0) { Console.WriteLine(StringManip.IndentText(StdErr.ToString(), 4)); } } }
private static void CheckSoils(ApsimFile.Component Data, ref string ErrorMessage) { if (Data.Type.ToLower() == "soil") { Soil ThisSoil = Soil.Create(Data.FullXML()); string Errors = ThisSoil.Check(true); if (!string.IsNullOrEmpty(Errors)) { ErrorMessage += Environment.NewLine + Data.FullPath + Environment.NewLine + StringManip.IndentText(Errors, 6); } } else if (Data.Type.ToLower() == "folder") { foreach (ApsimFile.Component Child in Data.ChildNodes) { CheckSoils(Child, ref ErrorMessage); } } }