RuntimeHelpers.PrepareContractedDelegate(Delegate) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a way for applications to dynamically prepare AppDomain event delegates.
public:
static void PrepareContractedDelegate(Delegate ^ d);
[System.Security.SecurityCritical]
public static void PrepareContractedDelegate(Delegate d);
public static void PrepareContractedDelegate(Delegate d);
[<System.Security.SecurityCritical>]
static member PrepareContractedDelegate : Delegate -> unit
static member PrepareContractedDelegate : Delegate -> unit
Public Shared Sub PrepareContractedDelegate (d As Delegate)
Parameters
- d
- Delegate
The event delegate to prepare.
- Attributes
Remarks
AppDomain event delegates such as DomainUnload, ProcessExit, and UnhandledException are not automatically prepared at startup. You can use the following methods to prepare them:
Attribute the method by using the PrePrepareMethodAttribute attribute.
Attribute the method by using the ReliabilityContractAttribute attribute.
Call the PrepareContractedDelegate method to dynamically prepare the delegate.
For more information, see the article Keep Your Code Running with the Reliability Features of the .NET Framework in the MSDN Magazine.