private Tuple<bool, IEnumerable<string>> Validate(string text) { using (var validatingReader = new RobotsFileValidatingReader(text)) { validatingReader.ValidateToEnd(); return new Tuple<bool, IEnumerable<string>>(validatingReader.IsValid, validatingReader.Errors.Select(error => T("Line {0}: {1}, {2}", error.LineNumber, error.BadContent, error.Error).ToString() )); } }
private Tuple <bool, IEnumerable <string> > Validate(string text) { using (var validatingReader = new RobotsFileValidatingReader(text)) { validatingReader.ValidateToEnd(); return(new Tuple <bool, IEnumerable <string> >(validatingReader.IsValid, validatingReader.Errors.Select(error => T("Line {0}: {1}, {2}", error.LineNumber, error.BadContent, error.Error).ToString() ))); } }