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()
				));
			}
		}
Beispiel #2
0
 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()
                                                                                                                 )));
     }
 }