public override void FromXml(SecurityElement securityElement) {
if (securityElement == null)
{
//
// null SecurityElement
//
throw new ArgumentNullException("securityElement");
}
if (!securityElement.Tag.Equals("IPermission"))
{
//
// SecurityElement must be a permission element
//
throw new ArgumentException(SR.GetString(SR.net_no_classname), "securityElement");
}
string className = securityElement.Attribute( "class" );
if (className == null)
{
//
// SecurityElement must be a permission element for this type
//
throw new ArgumentException(SR.GetString(SR.net_no_classname), "securityElement");
}
if (className.IndexOf( this.GetType().FullName ) < 0)
{
//
// SecurityElement must be a permission element for this type
//
throw new ArgumentException(SR.GetString(SR.net_no_typename), "securityElement");
}
string str = securityElement.Attribute( "Unrestricted" );
m_noRestriction = (str!=null?(0 == string.Compare( str, "true", StringComparison.OrdinalIgnoreCase)):false);
}