public sealed class DnsPermissionAttribute : CodeAccessSecurityAttribute
Object
Attribute
SecurityAttribute
CodeAccessSecurityAttribute
DnsPermissionAttribute
System
Networking
Used to declaratively specify permission to request information from Domain Name Servers.
[Note: The security information declared by a security attribute is stored in the metadata of the attribute target, and is accessed by the system at run-time. Security attributes are used for declarative security only. For imperative security, use the corresponding permission class, DnsPermission .The allowable DnsPermissionAttribute targets are determined by the SecurityAction passed to the constructor.
]
AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple=true, Inherited=false)
System.Net Namespace
DnsPermissionAttribute Constructors
DnsPermissionAttribute Constructor
DnsPermissionAttribute Methods
public DnsPermissionAttribute(SecurityAction action);
Constructs a new instance of the DnsPermissionAttribute class with the specified SecurityAction value.
- action
- A SecurityAction value.
Exception Type Condition ArgumentException action is not a valid SecurityAction value.
System.Net.DnsPermissionAttribute Class, System.Net Namespace
public override IPermission CreatePermission();
Returns a DnsPermission instance that contains the security information of the current instance.
A DnsPermission object with the security information of the current instance.
[Note: Applications typically do not call this method; it is intended for use by the system.The security information described by a security attribute is stored in the metadata of the attribute target, and is accessed by the system at run-time. The system uses the object returned by this method to convert the security information of the current instance into the form stored in metadata.
This method overrides System.Security.Permissions.SecurityAttribute.CreatePermission.
]
System.Net.DnsPermissionAttribute Class, System.Net Namespace