System.Security.Policy.PermissionRequestEvidence Class

Assembly: Mscorlib.dll
Namespace: System.Security.Policy
Summary
Defines evidence that represents permission requests. This class cannot be inherited.
C# Syntax:
[Serializable]
public sealed class PermissionRequestEvidence
Remarks
Permission requests include the minimum permissions the code requires to run, permissions the code can use if they are granted, but are not required, and permissions the code explicitly asks not to be granted.
See also:
System.Security.Policy Namespace See also:
MSDN: requestingpermissions

System.Security.Policy.PermissionRequestEvidence Member List:

Public Constructors
ctor #1 Initializes a new instance of the PermissionRequestEvidence class with the permission request of a code assembly.
Public Properties
DeniedPermissions Read-only

Gets the permissions the code explicitly asks not to be granted.
OptionalPermissions Read-only

Gets the permissions the code can use if they are granted, but are not required.
RequestedPermissions Read-only

Gets the minimum permissions the code requires to run.
Public Methods
Copy Creates an equivalent copy of the current PermissionRequestEvidence.
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString Overridden:
Gets a string representation of the state of the PermissionRequestEvidence.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Security.Policy.PermissionRequestEvidence Member Details

ctor #1
Summary
Initializes a new instance of the PermissionRequestEvidence class with the permission request of a code assembly.
C# Syntax:
public PermissionRequestEvidence(
   PermissionSet request,
   PermissionSet optional,
   PermissionSet denied
);
Parameters:

request

The minimum permissions the code requires to run.

optional

The permissions the code can use if they are granted, but that are not required.

denied

The permissions the code explicitly asks not to be granted.

Remarks
The .NET Framework security policy system uses the requested permissions along with a code assembly's Evidence to determine which permissions the code should be granted.
See also:
MSDN: requestingpermissions

Return to top


Property: DeniedPermissions (read-only)
Summary
Gets the permissions the code explicitly asks not to be granted.
C# Syntax:
public PermissionSet DeniedPermissions {get;}
See also:
MSDN: requestingpermissions

Return to top


Property: OptionalPermissions (read-only)
Summary
Gets the permissions the code can use if they are granted, but are not required.
C# Syntax:
public PermissionSet OptionalPermissions {get;}
See also:
MSDN: requestingpermissions

Return to top


Property: RequestedPermissions (read-only)
Summary
Gets the minimum permissions the code requires to run.
C# Syntax:
public PermissionSet RequestedPermissions {get;}
See also:
MSDN: requestingpermissions

Return to top


Method: Copy()
Summary
Creates an equivalent copy of the current PermissionRequestEvidence.
C# Syntax:
public PermissionRequestEvidence Copy();
Return Value:
An equivalent copy of the current PermissionRequestEvidence.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~PermissionRequestEvidence();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Overridden Method: ToString()
Summary
Gets a string representation of the state of the PermissionRequestEvidence.
C# Syntax:
public override string ToString();
Return Value:
A representation of the state of the PermissionRequestEvidence.
Remarks
This method is useful during debugging to get an easy-to-read representation of the PermissionRequestEvidence.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.