AvsAn_Test.Dictionaries.LoadEnglishDictionary C# (CSharp) Method

LoadEnglishDictionary() public static method

public static LoadEnglishDictionary ( ) : string[]
return string[]
        public static string[] LoadEnglishDictionary()
        {
            // ReSharper disable once AssignNullToNotNullAttribute
            using (var stream = typeof(CompleteDictionaryCheck).Assembly.GetManifestResourceStream(typeof(CompleteDictionaryCheck), "354984si.ngl"))
            using (var reader = new StreamReader(stream)) {
                return reader
                    .ReadToEnd()
                    .Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
            }
        }

Usage Example

コード例 #1
0
        public void DictionaryClassifications()
        {
            var dictionary       = Dictionaries.LoadEnglishDictionary();
            var mappedDictionary = string.Join("\n", dictionary.Select(word => word + " => " + AvsAn.Query(word).Article));

            MyApprove(mappedDictionary);
        }