当前位置: 首页>>代码示例>>C#>>正文


C# List.FindAll方法代码示例

本文整理汇总了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;
        }
开发者ID:Ogonik,项目名称:LWS,代码行数:30,代码来源:IPPISentenceWord.cs

示例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;
        }
开发者ID:Ogonik,项目名称:LWS,代码行数:14,代码来源:ComprenoSentenceElement.cs

示例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);
                    }
                }
            }
        }
开发者ID:Ogonik,项目名称:LWS,代码行数:31,代码来源:IPPISentenceWord.cs

示例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);
                }
            }
        }
开发者ID:Ogonik,项目名称:LWS,代码行数:13,代码来源:ComprenoSentenceElement.cs


注:本文中的Common.List.FindAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。