mscorlib(4.0.0.0) API with additions
|
Controls rights to access HTTP Internet resources. More...
Public Member Functions | |
WebPermission (PermissionState state) | |
Creates a new instance of the T:System.Net.WebPermission class that passes all demands or fails all demands. More... | |
WebPermission () | |
Creates a new instance of the T:System.Net.WebPermission class. More... | |
WebPermission (NetworkAccess access, Regex uriRegex) | |
Initializes a new instance of the T:System.Net.WebPermission class with the specified access rights for the specified URI regular expression. More... | |
WebPermission (NetworkAccess access, string uriString) | |
Initializes a new instance of the T:System.Net.WebPermission class with the specified access rights for the specified URI. More... | |
void | AddPermission (NetworkAccess access, string uriString) |
Adds the specified URI string with the specified access rights to the current T:System.Net.WebPermission. More... | |
void | AddPermission (NetworkAccess access, Regex uriRegex) |
Adds the specified URI with the specified access rights to the current T:System.Net.WebPermission. More... | |
bool | IsUnrestricted () |
Checks the overall permission state of the T:System.Net.WebPermission. More... | |
override IPermission | Copy () |
Creates a copy of a T:System.Net.WebPermission. More... | |
override bool | IsSubsetOf (IPermission target) |
Determines whether the current T:System.Net.WebPermission is a subset of the specified object. More... | |
override IPermission | Union (IPermission target) |
Returns the logical union between two instances of the T:System.Net.WebPermission class. More... | |
override IPermission | Intersect (IPermission target) |
Returns the logical intersection of two T:System.Net.WebPermission instances. More... | |
override void | FromXml (SecurityElement securityElement) |
Reconstructs a T:System.Net.WebPermission from an XML encoding. More... | |
override SecurityElement | ToXml () |
Creates an XML encoding of a T:System.Net.WebPermission 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... | |
Properties | |
IEnumerator?? | ConnectList [get] |
This property returns an enumeration of a single connect permissions held by this T:System.Net.WebPermission. The possible objects types contained in the returned enumeration are T:System.String and T:System.Text.RegularExpressions.Regex. More... | |
IEnumerator?? | AcceptList [get] |
This property returns an enumeration of a single accept permissions held by this T:System.Net.WebPermission. The possible objects types contained in the returned enumeration are T:System.String and T:System.Text.RegularExpressions.Regex. 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 HTTP Internet resources.
Definition at line 11 of file WebPermission.cs.
System.Net.WebPermission.WebPermission | ( | PermissionState | state | ) |
Creates a new instance of the T:System.Net.WebPermission class that passes all demands or fails all demands.
state | A T:System.Security.Permissions.PermissionState value. |
Definition at line 87 of file WebPermission.cs.
System.Net.WebPermission.WebPermission | ( | ) |
Creates a new instance of the T:System.Net.WebPermission class.
Definition at line 98 of file WebPermission.cs.
System.Net.WebPermission.WebPermission | ( | NetworkAccess | access, |
Regex | uriRegex | ||
) |
Initializes a new instance of the T:System.Net.WebPermission class with the specified access rights for the specified URI regular expression.
access | A T:System.Net.NetworkAccess value that indicates what kind of access to grant to the specified URI. F:System.Net.NetworkAccess.Accept indicates that the application is allowed to accept connections from the Internet on a local resource. F:System.Net.NetworkAccess.Connect indicates that the application is allowed to connect to specific Internet resources. |
uriRegex | A regular expression that describes the URI to which access is to be granted. |
Definition at line 111 of file WebPermission.cs.
System.Net.WebPermission.WebPermission | ( | NetworkAccess | access, |
string | uriString | ||
) |
Initializes a new instance of the T:System.Net.WebPermission class with the specified access rights for the specified URI.
access | A NetworkAccess value that indicates what kind of access to grant to the specified URI. F:System.Net.NetworkAccess.Accept indicates that the application is allowed to accept connections from the Internet on a local resource. F:System.Net.NetworkAccess.Connect indicates that the application is allowed to connect to specific Internet resources. |
uriString | A URI string to which access rights are granted. |
T:System.ArgumentNullException | uriString is null . |
Definition at line 121 of file WebPermission.cs.
void System.Net.WebPermission.AddPermission | ( | NetworkAccess | access, |
string | uriString | ||
) |
Adds the specified URI string with the specified access rights to the current T:System.Net.WebPermission.
access | A T:System.Net.NetworkAccess that specifies the access rights that are granted to the URI. |
uriString | A string that describes the URI to which access rights are granted. |
T:System.ArgumentNullException | uriString is null . |
Definition at line 136 of file WebPermission.cs.
void System.Net.WebPermission.AddPermission | ( | NetworkAccess | access, |
Regex | uriRegex | ||
) |
Adds the specified URI with the specified access rights to the current T:System.Net.WebPermission.
access | A NetworkAccess that specifies the access rights that are granted to the URI. |
uriRegex | A regular expression that describes the set of URIs to which access rights are granted. |
T:System.ArgumentNullException | The uriRegex parameter is null . |
Definition at line 219 of file WebPermission.cs.
|
virtual |
Creates a copy of a T:System.Net.WebPermission.
Implements System.Security.CodeAccessPermission.
Definition at line 287 of file WebPermission.cs.
|
virtual |
Reconstructs a T:System.Net.WebPermission from an XML encoding.
securityElement | The XML encoding from which to reconstruct the T:System.Net.WebPermission. |
T:System.ArgumentNullException | The securityElement parameter is null. |
T:System.ArgumentException | securityElement is not a permission element for this type. |
Implements System.Security.CodeAccessPermission.
Definition at line 556 of file WebPermission.cs.
|
virtual |
Returns the logical intersection of two T:System.Net.WebPermission instances.
target | The T:System.Net.WebPermission to compare with the current instance. |
null
.T:System.ArgumentException | target is not null or of type T:System.Net.WebPermission |
Implements System.Security.CodeAccessPermission.
Definition at line 500 of file WebPermission.cs.
|
virtual |
Determines whether the current T:System.Net.WebPermission is a subset of the specified object.
target | The T:System.Net.WebPermission to compare to the current T:System.Net.WebPermission. |
true
if the current instance is a subset of the target parameter; otherwise, false
. If the target is null
, the method returns true
for an empty current permission that is not unrestricted and false
otherwise.T:System.ArgumentException | The target parameter is not an instance of T:System.Net.WebPermission. |
T:System.NotSupportedException | The current instance contains a Regex-encoded right and there is not exactly the same right found in the target instance. |
Implements System.Security.CodeAccessPermission.
Definition at line 305 of file WebPermission.cs.
bool System.Net.WebPermission.IsUnrestricted | ( | ) |
Checks the overall permission state of the T:System.Net.WebPermission.
true
if the T:System.Net.WebPermission was created with the F:System.Security.Permissions.PermissionState.UnrestrictedT:System.Security.Permissions.PermissionState; otherwise, false
.Implements System.Security.Permissions.IUnrestrictedPermission.
Definition at line 280 of file WebPermission.cs.
|
virtual |
Creates an XML encoding of a T:System.Net.WebPermission and its current state.
Implements System.Security.CodeAccessPermission.
Definition at line 649 of file WebPermission.cs.
|
virtual |
Returns the logical union between two instances of the T:System.Net.WebPermission class.
target | The T:System.Net.WebPermission to combine with the current T:System.Net.WebPermission. |
WebPermission
is F:System.Security.Permissions.PermissionState.Unrestricted, the method returns a T:System.Net.WebPermission that is F:System.Security.Permissions.PermissionState.Unrestricted. If the target is null
, the method returns a copy of the current T:System.Net.WebPermission.T:System.ArgumentException | target is not null or of type T:System.Net.WebPermission. |
Reimplemented from System.Security.CodeAccessPermission.
Definition at line 422 of file WebPermission.cs.
|
get |
This property returns an enumeration of a single accept permissions held by this T:System.Net.WebPermission. The possible objects types contained in the returned enumeration are T:System.String and T:System.Text.RegularExpressions.Regex.
Definition at line 66 of file WebPermission.cs.
|
get |
This property returns an enumeration of a single connect permissions held by this T:System.Net.WebPermission. The possible objects types contained in the returned enumeration are T:System.String and T:System.Text.RegularExpressions.Regex.
Definition at line 44 of file WebPermission.cs.