Exemplo n.º 1
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()
				));
			}
		}
Exemplo n.º 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()
                                                                                                                 )));
     }
 }