public static IEnumerable <string> ReadLines(string path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (path.Length == 0) { throw new ArgumentException(SR.Argument_EmptyPath, nameof(path)); } return(ReadLinesIterator.CreateIterator(path, Encoding.UTF8)); }
/// <summary> /// </summary> /// <param name="path"> /// </param> /// <returns> /// </returns> /// <exception cref="ArgumentNullException"> /// </exception> /// <exception cref="ArgumentException"> /// </exception> public static IEnumerable <string> ReadLines(string path) { if (path == null) { throw new ArgumentNullException("path"); } if (path.Length == 0) { throw new ArgumentException(Environment.GetResourceString("Argument_EmptyPath"), "path"); } return(ReadLinesIterator.CreateIterator(path, Encoding.UTF8)); }
public static IEnumerable <String> ReadLines(String path) { if (path == null) { throw new ArgumentNullException("path"); } if (path.Length == 0) { throw new ArgumentException(SR.Argument_EmptyPath, "path"); } Contract.EndContractBlock(); return(ReadLinesIterator.CreateIterator(path, Encoding.UTF8)); }
public static IEnumerable <String> ReadLines(String path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (path.Length == 0) { throw new ArgumentException(Environment.GetResourceString("Argument_EmptyPath"), nameof(path)); } Contract.EndContractBlock(); return(ReadLinesIterator.CreateIterator(path, Encoding.UTF8)); }
public static IEnumerable <string> ReadLines(string path, Encoding encoding) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (encoding == null) { throw new ArgumentNullException(nameof(encoding)); } if (path.Length == 0) { throw new ArgumentException(SR.Argument_EmptyPath, nameof(path)); } Contract.EndContractBlock(); return(ReadLinesIterator.CreateIterator(path, encoding)); }
public static IEnumerable <string> ReadLines(string path, Encoding encoding) { Validate(path, encoding); return(ReadLinesIterator.CreateIterator(path, encoding)); }
internal static ReadLinesIterator CreateIterator(string path, Encoding encoding) { return(ReadLinesIterator.CreateIterator(path, encoding, (StreamReader)null)); }
protected override Iterator <string> Clone() { return((Iterator <string>)ReadLinesIterator.CreateIterator(this._path, this._encoding, this._reader)); }