12 private bool unrestricted;
57 this.access |= access;
89 if (networkInformationPermission ==
null)
112 if (networkInformationPermission ==
null)
116 if (unrestricted && networkInformationPermission.
IsUnrestricted())
134 if (networkInformationPermission ==
null)
138 if (unrestricted && !networkInformationPermission.
IsUnrestricted())
142 if ((access & networkInformationPermission.access) == access)
160 if (securityElement ==
null)
164 if (!securityElement.
Tag.Equals(
"IPermission"))
166 throw new ArgumentException(SR.GetString(
"net_not_ipermission"),
"securityElement");
168 string text = securityElement.Attribute(
"class");
171 throw new ArgumentException(SR.GetString(
"net_no_classname"),
"securityElement");
173 if (text.IndexOf(GetType().FullName) < 0)
177 string text2 = securityElement.Attribute(
"Unrestricted");
178 if (text2 !=
null &&
string.Compare(text2,
"true",
StringComparison.OrdinalIgnoreCase) == 0)
183 else if (securityElement.
Children !=
null)
187 text2 = child.Attribute(
"Access");
192 else if (
string.Compare(text2,
"Ping",
StringComparison.OrdinalIgnoreCase) == 0)
205 securityElement.
AddAttribute(
"class", GetType().FullName +
", " + GetType().
Module.Assembly.FullName.Replace(
'"',
'\''));
210 return securityElement;
216 securityElement.
AddChild(securityElement2);
222 securityElement.
AddChild(securityElement3);
224 return securityElement;
Allows a permission to expose an unrestricted state.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
string Tag
Gets or sets the tag name of an XML element.
void AddChild(SecurityElement child)
Adds a child element to the XML element.
Represents the XML object model for encoding security objects. This class cannot be inherited.
Defines the underlying structure of all code access permissions.
Defines methods implemented by permission types.
The exception that is thrown when one of the arguments provided to a method is not valid.
Attribute can be applied to a module.
PermissionState
Specifies whether a permission should have all or no access to resources at creation.
void AddAttribute(string name, string value)
Adds a name/value attribute to an XML element.
Specifies that the class can be serialized.
ArrayList Children
Gets or sets the array of child elements of the XML element.