RuntimeHelpers.PrepareContractedDelegate(Delegate) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
注意事項
The Constrained Execution Region (CER) feature is not supported.
アプリケーションが AppDomain イベント デリゲートを動的に準備する方法を提供します。
public:
static void PrepareContractedDelegate(Delegate ^ d);
[System.Obsolete("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId="SYSLIB0004", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static void PrepareContractedDelegate(Delegate d);
public static void PrepareContractedDelegate(Delegate d);
[System.Security.SecurityCritical]
public static void PrepareContractedDelegate(Delegate d);
[<System.Obsolete("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId="SYSLIB0004", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member PrepareContractedDelegate : Delegate -> unit
static member PrepareContractedDelegate : Delegate -> unit
[<System.Security.SecurityCritical>]
static member PrepareContractedDelegate : Delegate -> unit
Public Shared Sub PrepareContractedDelegate (d As Delegate)
パラメーター
- d
- Delegate
準備するイベント デリゲート。
- 属性
注釈
AppDomain DomainUnload、ProcessExit、UnhandledExceptionなどのイベント デリゲートは、起動時に自動的に準備されません。 次の方法を使用して準備できます。
PrePrepareMethodAttribute属性を使用してメソッドに属性を設定します。
ReliabilityContractAttribute属性を使用してメソッドに属性を設定します。
PrepareContractedDelegate メソッドを呼び出して、デリゲートを動的に準備します。
詳細については、MSDN マガジンの 「.NET Framework の信頼性機能を使用してコードを実行し続ける 」を参照してください。