SecurityManager.ResolvePolicy 方法

定义

确定授予代码的权限。

重载

ResolvePolicy(Evidence)
已过时.
已过时.

根据指定的证据确定向代码授予什么权限。

ResolvePolicy(Evidence[])
已过时.
已过时.

根据指定的证据确定向代码授予什么权限。

ResolvePolicy(Evidence, PermissionSet, PermissionSet, PermissionSet, PermissionSet)
已过时.
已过时.

根据指定的证据和请求确定向代码授予什么权限。

ResolvePolicy(Evidence)

Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs

注意

现已弃用此 API。

注意

This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

根据指定的证据确定向代码授予什么权限。

public:
 static System::Security::PermissionSet ^ ResolvePolicy(System::Security::Policy::Evidence ^ evidence);
[System.Obsolete]
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence evidence);
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence evidence);
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence evidence);
[<System.Obsolete>]
static member ResolvePolicy : System.Security.Policy.Evidence -> System.Security.PermissionSet
static member ResolvePolicy : System.Security.Policy.Evidence -> System.Security.PermissionSet
[<System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member ResolvePolicy : System.Security.Policy.Evidence -> System.Security.PermissionSet
Public Shared Function ResolvePolicy (evidence As Evidence) As PermissionSet

参数

evidence
Evidence

用于评估策略的证据集。

返回

可由安全系统授予的一组权限。

属性

例外

此方法使用代码访问安全性 (CAS) 策略,该策略在.NET Framework 4 中已过时。 若要使 CAS 策略与早期版本的 .NET Framework 兼容,请使用 <legacyCasPolicy> 元素

注解

此方法调用安全策略引擎,为其提供调用代码标识的证据。 结果由安全策略决定。

适用于

ResolvePolicy(Evidence[])

Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs

注意

现已弃用此 API。

注意

This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

根据指定的证据确定向代码授予什么权限。

public:
 static System::Security::PermissionSet ^ ResolvePolicy(cli::array <System::Security::Policy::Evidence ^> ^ evidences);
[System.Obsolete]
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence[] evidences);
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence[] evidences);
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence[] evidences);
[<System.Obsolete>]
static member ResolvePolicy : System.Security.Policy.Evidence[] -> System.Security.PermissionSet
static member ResolvePolicy : System.Security.Policy.Evidence[] -> System.Security.PermissionSet
[<System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member ResolvePolicy : System.Security.Policy.Evidence[] -> System.Security.PermissionSet
Public Shared Function ResolvePolicy (evidences As Evidence()) As PermissionSet

参数

evidences
Evidence[]

用于评估策略的证据对象的数组。

返回

适用于所有提供的证据的权限集。

属性

例外

此方法使用代码访问安全性 (CAS) 策略,该策略在.NET Framework 4 中已过时。 若要使 CAS 策略与早期版本的 .NET Framework 兼容,请使用 <legacyCasPolicy> 元素

注解

此方法调用安全策略引擎,为其提供对象数组 Evidence 。 返回的权限集仅表示应用于数组中每个证据的权限。 这些权限等效于 策略将授予每个单独证据的权限的子集。 此方法的行为就像对数组中每个 Evidence 对象解析策略的结果执行交集一样。

适用于

ResolvePolicy(Evidence, PermissionSet, PermissionSet, PermissionSet, PermissionSet)

Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs

注意

现已弃用此 API。

注意

This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.

根据指定的证据和请求确定向代码授予什么权限。

public:
 static System::Security::PermissionSet ^ ResolvePolicy(System::Security::Policy::Evidence ^ evidence, System::Security::PermissionSet ^ reqdPset, System::Security::PermissionSet ^ optPset, System::Security::PermissionSet ^ denyPset, [Runtime::InteropServices::Out] System::Security::PermissionSet ^ % denied);
[System.Obsolete]
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence evidence, System.Security.PermissionSet reqdPset, System.Security.PermissionSet optPset, System.Security.PermissionSet denyPset, out System.Security.PermissionSet denied);
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence evidence, System.Security.PermissionSet reqdPset, System.Security.PermissionSet optPset, System.Security.PermissionSet denyPset, out System.Security.PermissionSet denied);
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Security.PermissionSet ResolvePolicy (System.Security.Policy.Evidence evidence, System.Security.PermissionSet reqdPset, System.Security.PermissionSet optPset, System.Security.PermissionSet denyPset, out System.Security.PermissionSet denied);
[<System.Obsolete>]
static member ResolvePolicy : System.Security.Policy.Evidence * System.Security.PermissionSet * System.Security.PermissionSet * System.Security.PermissionSet * PermissionSet -> System.Security.PermissionSet
static member ResolvePolicy : System.Security.Policy.Evidence * System.Security.PermissionSet * System.Security.PermissionSet * System.Security.PermissionSet * PermissionSet -> System.Security.PermissionSet
[<System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member ResolvePolicy : System.Security.Policy.Evidence * System.Security.PermissionSet * System.Security.PermissionSet * System.Security.PermissionSet * PermissionSet -> System.Security.PermissionSet
Public Shared Function ResolvePolicy (evidence As Evidence, reqdPset As PermissionSet, optPset As PermissionSet, denyPset As PermissionSet, ByRef denied As PermissionSet) As PermissionSet

参数

evidence
Evidence

用于评估策略的证据集。

reqdPset
PermissionSet

该代码需要运行的所需权限。

optPset
PermissionSet

将使用的可选权限(如授权),但运行代码不需要它。

denyPset
PermissionSet

决不能授予代码的拒绝权限,即使策略允许。

denied
PermissionSet

包含未授予的权限集的输出参数。

返回

可由安全系统授予的一组权限。

属性

例外

此方法使用代码访问安全性 (CAS) 策略,该策略在.NET Framework 4 中已过时。 若要使 CAS 策略与早期版本的 .NET Framework 兼容,请使用 <legacyCasPolicy> 元素

策略无法授予 reqdPset 参数指定的所需最小权限。

注解

此方法调用安全策略引擎,为其提供调用代码标识的证据和代码请求的权限集。 结果由安全策略决定。 此方法返回将由安全系统授予的权限集,并返回将拒绝作为输出参数的权限集。 有效授予的权限是授予集内不在拒绝集中的权限。

适用于