System.Security.SecurityElement.SearchForTextOfLocalName C# (CSharp) Method

SearchForTextOfLocalName() private method

private SearchForTextOfLocalName ( string strLocalName ) : string
strLocalName string
return string
        internal string SearchForTextOfLocalName(string strLocalName)
        {
            // Search on each child in order and each
            // child's child, depth-first
            if (strLocalName == null)
                throw new ArgumentNullException(nameof(strLocalName));

            // Note: we don't check for a valid tag here because
            // an invalid tag simply won't be found.    
            if (_tag == null)
                return null;
            if (_tag.Equals(strLocalName) || _tag.EndsWith(":" + strLocalName, StringComparison.Ordinal))
                return Unescape(_text);
            if (_children == null)
                return null;

            IEnumerator enumerator = _children.GetEnumerator();
            foreach (SecurityElement currentElement in _children)
            {
                string current = currentElement.SearchForTextOfLocalName(strLocalName);
                if (current != null)
                    return current;
            }
            return null;
        }