mscorlib(4.0.0.0) API with additions
System.Net.DnsPermission Class Reference

Controls rights to access Domain Name System (DNS) servers on the network. More...

Inheritance diagram for System.Net.DnsPermission:
[legend]
Collaboration diagram for System.Net.DnsPermission:
[legend]

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...
 
- Public Member Functions inherited from System.Security.CodeAccessPermission
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 Public Member Functions inherited from System.Security.CodeAccessPermission
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...
 

Detailed Description

Controls rights to access Domain Name System (DNS) servers on the network.

Definition at line 8 of file DnsPermission.cs.

Constructor & Destructor Documentation

◆ DnsPermission()

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.

Parameters
stateOne of the T:System.Security.Permissions.PermissionState values.
Exceptions
T:System.ArgumentExceptionstate is not a valid T:System.Security.Permissions.PermissionState value.

Definition at line 16 of file DnsPermission.cs.

Member Function Documentation

◆ Copy()

override IPermission System.Net.DnsPermission.Copy ( )
virtual

Creates an identical copy of the current permission instance.

Returns
A new instance of the T:System.Net.DnsPermission class that is an identical copy of the current instance.

Implements System.Security.CodeAccessPermission.

Definition at line 36 of file DnsPermission.cs.

◆ FromXml()

override void System.Net.DnsPermission.FromXml ( SecurityElement  securityElement)
virtual

Reconstructs a T:System.Net.DnsPermission instance from an XML encoding.

Parameters
securityElementThe XML encoding to use to reconstruct the T:System.Net.DnsPermission instance.
Exceptions
T:System.ArgumentNullExceptionsecurityElement is null.
T:System.ArgumentExceptionsecurityElement is not a T:System.Net.DnsPermission element.

Implements System.Security.CodeAccessPermission.

Definition at line 113 of file DnsPermission.cs.

◆ Intersect()

override IPermission System.Net.DnsPermission.Intersect ( IPermission  target)
virtual

Creates a permission instance that is the intersection of the current permission instance and the specified permission instance.

Parameters
targetThe T:System.Net.DnsPermission instance to intersect with the current instance.
Returns
A T:System.Net.DnsPermission instance that represents the intersection of the current T:System.Net.DnsPermission instance with the specified T:System.Net.DnsPermission instance, or 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.
Exceptions
T:System.ArgumentExceptiontarget is neither a T:System.Net.DnsPermission nor null.

Implements System.Security.CodeAccessPermission.

Definition at line 65 of file DnsPermission.cs.

◆ IsSubsetOf()

override bool System.Net.DnsPermission.IsSubsetOf ( IPermission  target)
virtual

Determines whether the current permission instance is a subset of the specified permission instance.

Parameters
targetThe second T:System.Net.DnsPermission instance to be tested for the subset relationship.
Returns
false if the current instance is unrestricted and target is either null or unrestricted; otherwise, true.
Exceptions
T:System.ArgumentExceptiontarget is neither a T:System.Net.DnsPermission nor null.

Implements System.Security.CodeAccessPermission.

Definition at line 89 of file DnsPermission.cs.

◆ IsUnrestricted()

bool System.Net.DnsPermission.IsUnrestricted ( )

Checks the overall permission state of the object.

Returns
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.

◆ ToXml()

override SecurityElement System.Net.DnsPermission.ToXml ( )
virtual

Creates an XML encoding of a T:System.Net.DnsPermission instance and its current state.

Returns
A T:System.Security.SecurityElement instance that contains an XML-encoded representation of the security object, including state information.

Implements System.Security.CodeAccessPermission.

Definition at line 138 of file DnsPermission.cs.

◆ Union()

override IPermission System.Net.DnsPermission.Union ( IPermission  target)
virtual

Creates a permission instance that is the union of the current permission instance and the specified permission instance.

Parameters
targetThe T:System.Net.DnsPermission instance to combine with the current instance.
Returns
A T:System.Net.DnsPermission instance that represents the union of the current T:System.Net.DnsPermission instance with the specified T:System.Net.DnsPermission instance. If target is 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.
Exceptions
T:System.ArgumentExceptiontarget is neither a T:System.Net.DnsPermission nor null.

Reimplemented from System.Security.CodeAccessPermission.

Definition at line 46 of file DnsPermission.cs.


The documentation for this class was generated from the following file: