8 [Obsolete(
"Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
17 private string m_strRequest;
19 private string m_strOptional;
21 private string m_strDenied;
47 m_request = request.
Copy();
55 m_optional = optional.
Copy();
63 m_denied = denied.
Copy();
85 if (m_request !=
null)
88 securityElement2.
AddChild(m_request.ToXml());
89 securityElement.
AddChild(securityElement2);
91 if (m_optional !=
null)
94 securityElement2.
AddChild(m_optional.ToXml());
95 securityElement.
AddChild(securityElement2);
99 SecurityElement securityElement2 =
new SecurityElement(
"Denied");
100 securityElement2.AddChild(m_denied.ToXml());
101 securityElement.
AddChild(securityElement2);
103 return securityElement;
PermissionSet DeniedPermissions
Gets the permissions the code explicitly asks not to be granted.
Provides a base class from which all objects to be used as evidence must derive.
void AddChild(SecurityElement child)
Adds a child element to the XML element.
PermissionRequestEvidence Copy()
Creates an equivalent copy of the current T:System.Security.Policy.PermissionRequestEvidence.
Represents a collection that can contain many different types of permissions.
Represents the XML object model for encoding security objects. This class cannot be inherited.
PermissionSet OptionalPermissions
Gets the permissions the code can use if they are granted, but are not required.
override EvidenceBase Clone()
Creates a new object that is a copy of the current instance.
PermissionRequestEvidence(PermissionSet request, PermissionSet optional, PermissionSet denied)
Initializes a new instance of the T:System.Security.Policy.PermissionRequestEvidence class with the p...
void AddAttribute(string name, string value)
Adds a name/value attribute to an XML element.
Specifies that the class can be serialized.
override string ToString()
Gets a string representation of the state of the T:System.Security.Policy.PermissionRequestEvidence.
virtual PermissionSet Copy()
Creates a copy of the T:System.Security.PermissionSet.
PermissionSet RequestedPermissions
Gets the minimum permissions the code requires to run.
Defines evidence that represents permission requests. This class cannot be inherited.
override string ToString()
Produces a string representation of an XML element and its constituent attributes,...