public static AffixConfig Read(Stream stream, AffixConfig.Builder builder = null) { using (var reader = new DynamicEncodingLineReader(stream, DefaultEncoding)) { return(Read(reader, builder)); } }
public static async Task <AffixConfig> ReadAsync(Stream stream, AffixConfig.Builder builder = null) { using (var reader = new DynamicEncodingLineReader(stream, DefaultEncoding)) { return(await ReadAsync(reader, builder).ConfigureAwait(false)); } }
public static async Task <List <string> > ReadLinesAsync(string filePath, Encoding defaultEncoding) { using (var stream = File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.Read)) using (var reader = new DynamicEncodingLineReader(stream, defaultEncoding)) { return(await reader.ReadLinesAsync().ConfigureAwait(false)); } }
public static List <string> ReadLines(string filePath, Encoding defaultEncoding) { using (var stream = File.Open(filePath, FileMode.Open, FileAccess.Read, FileShare.Read)) using (var reader = new DynamicEncodingLineReader(stream, defaultEncoding)) { return(reader.ReadLines().ToList()); } }