本文整理汇总了C#中Common.List.FindAll方法的典型用法代码示例。如果您正苦于以下问题:C# List.FindAll方法的具体用法?C# List.FindAll怎么用?C# List.FindAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Common.List
的用法示例。
在下文中一共展示了List.FindAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _addChildWords
private void _addChildWords(ref INode<int> node, ref List<SentenceWord> sentenceWordList, int[] excludeIds, bool checkLinkType = true)
{
var localNode = node;
foreach (var word in sentenceWordList.FindAll(x => x.DOM == localNode.Data))
{
if (!excludeIds.Contains(word.Id))
{
if (checkLinkType)
{
if (
!(word.Link.Value == LinkType.SentSoch.Value
|| word.Link.Value == LinkType.PodchSouz.Value
|| word.Link.Value == LinkType.InfSouz.Value
|| word.Link.Value == LinkType.Eksplet.Value
|| word.Link.Value == LinkType.Relyat.Value))
{
var newNode = node.AddChild(word.Id);
_addChildWords(ref newNode, ref sentenceWordList, excludeIds);
}
}
else
{
var newNode = node.AddChild(word.Id);
_addChildWords(ref newNode, ref sentenceWordList, excludeIds);
}
}
}
node = localNode;
}
示例2: _addChildWords
private void _addChildWords(ref INode<string> node, ref List<SentenceElement> sentenceWordList, string[] excludeIds)
{
var localNode = node;
foreach (var word in sentenceWordList.FindAll(x => x.SyntacticParentWordId == localNode.Data))
{
if (!excludeIds.Contains(word.Id))
{
var newNode = node.AddChild(word.Id);
_addChildWords(ref newNode, ref sentenceWordList, excludeIds);
}
}
node = localNode;
}
示例3: LoadChainList
public void LoadChainList(int[] excludeIds, ref List<SentenceWord> sentenceWordList, bool checkLinkType = true, bool addSelf = false)
{
Debug.Assert(sentenceWordList != null);
INode<int> newNode = null;
if (addSelf)
newNode = ChainWordsIds.AddChild(Id);
foreach (var word in sentenceWordList.FindAll(x => x.DOM == Id))
{
if (!excludeIds.Contains(word.Id))
{
if (checkLinkType)
{
if (!(word.Link.Value == LinkType.SentSoch.Value
|| word.Link.Value == LinkType.PodchSouz.Value
|| word.Link.Value == LinkType.InfSouz.Value
|| word.Link.Value == LinkType.Eksplet.Value
|| word.Link.Value == LinkType.Relyat.Value))
{
newNode = ChainWordsIds.AddChild(word.Id);
_addChildWords(ref newNode, ref sentenceWordList, excludeIds);
}
}
else
{
newNode = ChainWordsIds.AddChild(word.Id);
_addChildWords(ref newNode, ref sentenceWordList, excludeIds, checkLinkType);
}
}
}
}
示例4: LoadChainList
public void LoadChainList(string[] excludeIds, ref List<SentenceElement> sentenceWordList)
{
Debug.Assert(sentenceWordList != null);
foreach (var word in sentenceWordList.FindAll(x => x.SyntacticParentWordId == Id))
{
if (!excludeIds.Contains(word.Id))
{
var newNode = ChainWordsIds.AddChild(word.Id);
_addChildWords(ref newNode, ref sentenceWordList, excludeIds);
}
}
}