コード例 #1
0
 public static async Task <WordList> ReadAsync(Stream dictionaryStream, AffixConfig affix, WordList.Builder builder = null)
 {
     using (var reader = new StaticEncodingLineReader(dictionaryStream, affix.Encoding))
     {
         return(await ReadAsync(reader, affix, builder).ConfigureAwait(false));
     }
 }
コード例 #2
0
 public static WordList Read(Stream dictionaryStream, AffixConfig affix, WordList.Builder builder = null)
 {
     using (var reader = new StaticEncodingLineReader(dictionaryStream, affix.Encoding))
     {
         return(Read(reader, affix, builder));
     }
 }
コード例 #3
0
 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 StaticEncodingLineReader(stream, defaultEncoding))
         {
             return(await reader.ReadLinesAsync().ConfigureAwait(false));
         }
 }
コード例 #4
0
 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 StaticEncodingLineReader(stream, defaultEncoding))
         {
             return(reader.ReadLines().ToList());
         }
 }