// Token: 0x060026D9 RID: 9945 RVA: 0x000B818C File Offset: 0x000B638C
        private List <AutomationPeer> GetChildrenAutomationPeer(Visual parent, bool includeInvisibleItems)
        {
            Invariant.Assert(parent != null);
            List <AutomationPeer> children = null;

            GridViewCellAutomationPeer.iterate(parent, includeInvisibleItems, delegate(AutomationPeer peer)
            {
                if (children == null)
                {
                    children = new List <AutomationPeer>();
                }
                children.Add(peer);
                return(false);
            });
            return(children);
        }
        // Token: 0x060026DA RID: 9946 RVA: 0x000B81CC File Offset: 0x000B63CC
        private static bool iterate(Visual parent, bool includeInvisibleItems, GridViewCellAutomationPeer.IteratorCallback callback)
        {
            bool flag = false;
            int  internalVisualChildrenCount = parent.InternalVisualChildrenCount;
            int  num = 0;

            while (num < internalVisualChildrenCount && !flag)
            {
                Visual         visual = parent.InternalGetVisualChild(num);
                AutomationPeer peer;
                if (visual != null && visual.CheckFlagsAnd(VisualFlags.IsUIElement) && (includeInvisibleItems || ((UIElement)visual).IsVisible) && (peer = UIElementAutomationPeer.CreatePeerForElement((UIElement)visual)) != null)
                {
                    flag = callback(peer);
                }
                else
                {
                    flag = GridViewCellAutomationPeer.iterate(visual, includeInvisibleItems, callback);
                }
                num++;
            }
            return(flag);
        }