private static async Task ProcessBlocksFile(IDataSource ucdSource, UnicodeInfoBuilder builder) { using (var reader = new UnicodeDataFileReader(await ucdSource.OpenDataFileAsync(BlocksFileName).ConfigureAwait(false), ';')) { while (reader.MoveToNextLine()) { builder.AddBlockEntry(new UnicodeBlock(UnicodeCodePointRange.Parse(reader.ReadField()), reader.ReadTrimmedField())); } } }
private static async Task ProcessEmojiDataFile(IDataSource emojiSource, UnicodeInfoBuilder builder) { using (var reader = new UnicodeDataFileReader(await emojiSource.OpenDataFileAsync(EmojiDataFileName).ConfigureAwait(false), ';')) { while (reader.MoveToNextLine()) { var range = UnicodeCodePointRange.Parse(reader.ReadTrimmedField()); if (EnumHelper <EmojiProperties> .TryGetNamedValue(reader.ReadTrimmedField(), out var property)) { builder.SetProperties(property, range); } } } }