Imported Upstream version 4.2.0.179

Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent aa7da660d6
commit c042cd0c52
7507 changed files with 90259 additions and 657307 deletions

View File

@ -33,11 +33,19 @@ using System.Globalization;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;
using System.Diagnostics.Contracts;
using Mono.Xml;
namespace System.Security {
internal enum SecurityElementType
{
Regular = 0,
Format = 1,
Comment = 2
}
[ComVisible (true)]
[Serializable]
public sealed class SecurityElement
@ -454,5 +462,64 @@ namespace System.Security {
}
return null;
}
internal string m_strTag {
get {
return tag;
}
}
internal string m_strText {
get {
return text;
}
set {
text = value;
}
}
internal ArrayList m_lAttributes {
get {
return attributes;
}
}
internal ArrayList InternalChildren {
get {
return children;
}
}
internal String SearchForTextOfLocalName(String strLocalName)
{
// Search on each child in order and each
// child's child, depth-first
if (strLocalName == null)
throw new ArgumentNullException( "strLocalName" );
Contract.EndContractBlock();
// Note: we don't check for a valid tag here because
// an invalid tag simply won't be found.
// First we check this.
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();
while (enumerator.MoveNext())
{
String current = ((SecurityElement)enumerator.Current).SearchForTextOfLocalName( strLocalName );
if (current != null)
return current;
}
return null;
}
}
}