HostProtectionException.DemandedResources 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定導致擲回例外狀況的要求主機保護資源。
public:
property System::Security::Permissions::HostProtectionResource DemandedResources { System::Security::Permissions::HostProtectionResource get(); };
public System.Security.Permissions.HostProtectionResource DemandedResources { get; }
member this.DemandedResources : System.Security.Permissions.HostProtectionResource
Public ReadOnly Property DemandedResources As HostProtectionResource
屬性值
HostProtectionResource 值的位元組合,識別導致擲回例外狀況的保護資源。 預設為 None。
備註
此屬性會傳回導致擲回例外狀況的要求主機保護類別。 例如,假設方法具有 HostProtectionAttribute 屬性,表示方法會公開共享狀態。 呼叫 方法時,會 HostProtectionAttribute 執行共享狀態的連結需求。 如果主機已將共享狀態設定為禁止的類別,則會 HostProtectionException 引發 ,而 DemandedResources 屬性值為 HostProtectionResource.SharedState。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應