mscorlib(4.0.0.0) API with additions
|
Controls rights to access Domain Name System (DNS) servers on the network. More...
Public Member Functions | |
DnsPermission (PermissionState state) | |
Creates a new instance of the T:System.Net.DnsPermission class that either allows unrestricted DNS access or disallows DNS access. More... | |
bool | IsUnrestricted () |
Checks the overall permission state of the object. More... | |
override IPermission | Copy () |
Creates an identical copy of the current permission instance. More... | |
override IPermission | Union (IPermission target) |
Creates a permission instance that is the union of the current permission instance and the specified permission instance. More... | |
override IPermission | Intersect (IPermission target) |
Creates a permission instance that is the intersection of the current permission instance and the specified permission instance. More... | |
override bool | IsSubsetOf (IPermission target) |
Determines whether the current permission instance is a subset of the specified permission instance. More... | |
override void | FromXml (SecurityElement securityElement) |
Reconstructs a T:System.Net.DnsPermission instance from an XML encoding. More... | |
override SecurityElement | ToXml () |
Creates an XML encoding of a T:System.Net.DnsPermission instance and its current state. More... | |
![]() | |
void | Demand () |
Forces a T:System.Security.SecurityException at run time if all callers higher in the call stack have not been granted the permission specified by the current instance. More... | |
void | Assert () |
Declares that the calling code can access the resource protected by a permission demand through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource. Using M:System.Security.CodeAccessPermission.Assert can create security issues. More... | |
void | Deny () |
Prevents callers higher in the call stack from using the code that calls this method to access the resource specified by the current instance. More... | |
void | PermitOnly () |
Prevents callers higher in the call stack from using the code that calls this method to access all resources except for the resource specified by the current instance. More... | |
override string | ToString () |
Creates and returns a string representation of the current permission object. More... | |
override bool | Equals (object obj) |
Determines whether the specified T:System.Security.CodeAccessPermission object is equal to the current T:System.Security.CodeAccessPermission. More... | |
override int | GetHashCode () |
Gets a hash code for the T:System.Security.CodeAccessPermission object that is suitable for use in hashing algorithms and data structures such as a hash table. More... | |
Additional Inherited Members | |
![]() | |
static void | RevertAssert () |
Causes any previous M:System.Security.CodeAccessPermission.Assert for the current frame to be removed and no longer in effect. More... | |
static void | RevertDeny () |
Causes any previous M:System.Security.CodeAccessPermission.Deny for the current frame to be removed and no longer in effect. More... | |
static void | RevertPermitOnly () |
Causes any previous M:System.Security.CodeAccessPermission.PermitOnly for the current frame to be removed and no longer in effect. More... | |
static void | RevertAll () |
Causes all previous overrides for the current frame to be removed and no longer in effect. More... | |
Controls rights to access Domain Name System (DNS) servers on the network.
Definition at line 8 of file DnsPermission.cs.
System.Net.DnsPermission.DnsPermission | ( | PermissionState | state | ) |
Creates a new instance of the T:System.Net.DnsPermission class that either allows unrestricted DNS access or disallows DNS access.
state | One of the T:System.Security.Permissions.PermissionState values. |
T:System.ArgumentException | state is not a valid T:System.Security.Permissions.PermissionState value. |
Definition at line 16 of file DnsPermission.cs.
|
virtual |
Creates an identical copy of the current permission instance.
Implements System.Security.CodeAccessPermission.
Definition at line 36 of file DnsPermission.cs.
|
virtual |
Reconstructs a T:System.Net.DnsPermission instance from an XML encoding.
securityElement | The XML encoding to use to reconstruct the T:System.Net.DnsPermission instance. |
T:System.ArgumentNullException | securityElement is null . |
T:System.ArgumentException | securityElement is not a T:System.Net.DnsPermission element. |
Implements System.Security.CodeAccessPermission.
Definition at line 113 of file DnsPermission.cs.
|
virtual |
Creates a permission instance that is the intersection of the current permission instance and the specified permission instance.
target | The T:System.Net.DnsPermission instance to intersect with the current instance. |
null
if the intersection is empty. If both the current instance and target are unrestricted, this method returns a new T:System.Net.DnsPermission instance that is unrestricted; otherwise, it returns null
.T:System.ArgumentException | target is neither a T:System.Net.DnsPermission nor null . |
Implements System.Security.CodeAccessPermission.
Definition at line 65 of file DnsPermission.cs.
|
virtual |
Determines whether the current permission instance is a subset of the specified permission instance.
target | The second T:System.Net.DnsPermission instance to be tested for the subset relationship. |
false
if the current instance is unrestricted and target is either null
or unrestricted; otherwise, true
.T:System.ArgumentException | target is neither a T:System.Net.DnsPermission nor null . |
Implements System.Security.CodeAccessPermission.
Definition at line 89 of file DnsPermission.cs.
bool System.Net.DnsPermission.IsUnrestricted | ( | ) |
Checks the overall permission state of the object.
true
if the T:System.Net.DnsPermission instance was created with F:System.Security.Permissions.PermissionState.Unrestricted; otherwise, false
.Implements System.Security.Permissions.IUnrestrictedPermission.
Definition at line 29 of file DnsPermission.cs.
|
virtual |
Creates an XML encoding of a T:System.Net.DnsPermission instance and its current state.
Implements System.Security.CodeAccessPermission.
Definition at line 138 of file DnsPermission.cs.
|
virtual |
Creates a permission instance that is the union of the current permission instance and the specified permission instance.
target | The T:System.Net.DnsPermission instance to combine with the current instance. |
null
, this method returns a copy of the current instance. If the current instance or target is unrestricted, this method returns a T:System.Net.DnsPermission instance that is unrestricted; otherwise, it returns a T:System.Net.DnsPermission instance that is restricted.T:System.ArgumentException | target is neither a T:System.Net.DnsPermission nor null . |
Reimplemented from System.Security.CodeAccessPermission.
Definition at line 46 of file DnsPermission.cs.