共用方式為


SecurityManager.ResolvePolicy 方法

定義

判斷授與程式碼的使用權限。

多載

ResolvePolicy(Evidence)
已淘汰.
已淘汰.

根據指定的辨識項,判斷授與程式碼的權限。

ResolvePolicy(Evidence[])
已淘汰.
已淘汰.

根據指定的辨識項,判斷授與程式碼的權限。

ResolvePolicy(Evidence, PermissionSet, PermissionSet, PermissionSet, PermissionSet)
已淘汰.
已淘汰.

根據指定的辨識項和要求,判斷授與程式碼的權限。

ResolvePolicy(Evidence)

來源:
SecurityManager.cs
來源:
SecurityManager.cs
來源:
SecurityManager.cs
來源:
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[])

來源:
SecurityManager.cs
來源:
SecurityManager.cs
來源:
SecurityManager.cs
來源:
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)

來源:
SecurityManager.cs
來源:
SecurityManager.cs
來源:
SecurityManager.cs
來源:
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 參數指定的基本必要權限。

備註

這個方法會叫用安全策略引擎,以提供呼叫程式代碼身分識別的辨識項,以及程式代碼要求的許可權集。 結果是由安全策略所決定。 這個方法會傳回安全性系統將授與的許可權集,並傳回會拒絕做為輸出參數的許可權集。 有效的授與許可權是在未在拒絕集合中授與的集合中。

適用於