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

SearchForChildByTag() public method

public SearchForChildByTag ( string tag ) : SecurityElement
tag string
return SecurityElement
        public SecurityElement SearchForChildByTag(string tag)
        {
            // Go through all the children and see if we can
            // find the one are are asked for (matching tags)
            if (tag == null)
                throw new ArgumentNullException(nameof(tag));

            // Note: we don't check for a valid tag here because
            // an invalid tag simply won't be found.    
            if (_children == null)
                return null;
            foreach (SecurityElement current in _children)
            {
                if (current != null && string.Equals(current.Tag, tag))
                    return current;
            }
            return null;
        }

Usage Example

Beispiel #1
0
 private byte[] GetNamedParam(SecurityElement se, string param)
 {
     SecurityElement sep = se.SearchForChildByTag(param);
     if (sep == null)
         return null;
     return Convert.FromBase64String(sep.Text);
 }
All Usage Examples Of System.Security.SecurityElement::SearchForChildByTag