FairyGUI.Utils.XMLList.Filter C# (CSharp) 메소드

Filter() 공개 메소드

public Filter ( string selector ) : XMLList
selector string
리턴 XMLList
        public XMLList Filter(string selector)
        {
            bool allFit = true;
            _tmpList.Clear();
            int cnt = rawList.Count;
            for (int i = 0; i < cnt; i++)
            {
                XML xml = rawList[i];
                if (xml.name == selector)
                    _tmpList.Add(xml);
                else
                    allFit = false;
            }

            if (allFit)
                return this;
            else
            {
                XMLList ret = new XMLList(_tmpList);
                _tmpList = new List<XML>();
                return ret;
            }
        }

Usage Example

예제 #1
0
파일: XML.cs 프로젝트: pinzeweifen/DCET
 public XMLList Elements(string selector)
 {
     if (_children == null)
     {
         _children = new XMLList();
     }
     return(_children.Filter(selector));
 }