Exemplo n.º 1
0
        private static async Task WriteToAsync(TextWriter writer, string prefix, LanguageWordList wordList)
        {
            if (wordList.Words.Count == 0)
            {
                return;
            }

            if (!string.IsNullOrWhiteSpace(prefix))
            {
                await writer.WriteAsync(prefix);

                await writer.WriteAsync(Constants.PrefixSeparator);
            }

            await writer.WriteAsync(wordList.Language.Name);

            await writer.WriteAsync(Constants.LanguageSeparator);

            await writer.WriteLineAsync(string.Join(Constants.TermSeparator + " ", wordList.Words));
        }
Exemplo n.º 2
0
        private static async Task WriteToAsync(TextWriter writer, string prefix, LanguageWordList wordList)
        {
            if (wordList.Words.Count == 0)
            {
                return;
            }

            if (!string.IsNullOrWhiteSpace(prefix))
            {
                await writer.WriteAsync(prefix);
                await writer.WriteAsync(Constants.PrefixSeparator);
            }

            await writer.WriteAsync(wordList.Language.Name);
            await writer.WriteAsync(Constants.LanguageSeparator);
            await writer.WriteLineAsync(string.Join(Constants.TermSeparator + " ", wordList.Words));
        }