本文整理汇总了C#中Language.Analyze方法的典型用法代码示例。如果您正苦于以下问题:C# Language.Analyze方法的具体用法?C# Language.Analyze怎么用?C# Language.Analyze使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Language
的用法示例。
在下文中一共展示了Language.Analyze方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Analyze
public static void Analyze(Language language, IEnumerable<string> words)
{
foreach (string word in words)
{
IList<Word> solutions = language.Analyze(word);
Console.WriteLine("\n{0} için {1} çözüm bulundu:", word, solutions.Count);
foreach (Word solution in solutions)
{
Console.WriteLine($"\t{solution}\n");
//Console.WriteLine($"\t{solution.ToString(WordFormat.MyFormat)}\n");
}
}
}
示例2: GetSolution
private static Word GetSolution(ConjugationLine entry, Language language)
{
foreach (Word solution in language.Analyze(entry.Verb))
{
if (solution.ToString() == entry.Solution)
{
return solution;
}
}
throw new Exception("Çekimli Fiil için çözüm bulunamadı");
}