Пример #1
0
        private T Single(UQuery.SingleQueryMatcher matcher)
        {
            matcher.Run(m_Element, m_Matchers);
            var match = matcher.match as T;

            // We need to make sure we don't leak a ref to the VisualElement.
            matcher.match = null;
            return(match);
        }
Пример #2
0
        private T Single(UQuery.SingleQueryMatcher matcher)
        {
            if (matcher.IsInUse())  //Prevent reentrance issues
            {
                matcher = matcher.CreateNew();
            }

            matcher.Run(m_Element, m_Matchers);
            var match = matcher.match as T;

            // We need to make sure we don't leak a ref to the VisualElement.
            matcher.match = null;
            return(match);
        }