/// <summary> /// Validates class and collects errors and warnings. /// </summary> /// <param name="errors"></param> /// <param name="warnings"></param> public void Validate(out string[] errors, out string[] warnings) { errors = new string[] { }; warnings = new string[] { }; List <string> errs = new List <string>(); List <string> wars = new List <string>(); if (!File.Exists(Input1)) { errs.Add(String.Format("Input file does not exist: '{0}'", Input1)); } if (!Input1.Equals(Input2, StringComparison.OrdinalIgnoreCase) && !File.Exists(Input2)) { errs.Add(String.Format("Input file does not exist: '{0}'", Input2)); } if (Operator == Operation.Unknown) { errs.Add("Operation is not specified. CADDIE doesn't know what to do."); } if (File.Exists(Output)) { wars.Add(String.Format("Output file already exists, it will be overwritten: '{0}'", Output)); } errors = errs.ToArray(); warnings = wars.ToArray(); }