ResolveEventHandler Delegate
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.
Represents a method that handles the TypeResolve, ResourceResolve, or AssemblyResolve event of an AppDomain.
public delegate System::Reflection::Assembly ^ ResolveEventHandler(System::Object ^ sender, ResolveEventArgs ^ args);
public delegate System.Reflection.Assembly? ResolveEventHandler(object? sender, ResolveEventArgs args);
public delegate System.Reflection.Assembly ResolveEventHandler(object sender, ResolveEventArgs args);
[System.Serializable]
public delegate System.Reflection.Assembly ResolveEventHandler(object sender, ResolveEventArgs args);
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public delegate System.Reflection.Assembly ResolveEventHandler(object sender, ResolveEventArgs args);
type ResolveEventHandler = delegate of obj * ResolveEventArgs -> Assembly
[<System.Serializable>]
type ResolveEventHandler = delegate of obj * ResolveEventArgs -> Assembly
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type ResolveEventHandler = delegate of obj * ResolveEventArgs -> Assembly
Public Delegate Function ResolveEventHandler(sender As Object, args As ResolveEventArgs) As Assembly
Parameters
- sender
- Object
The source of the event.
- args
- ResolveEventArgs
The event data.
Return Value
The assembly that resolves the type, assembly, or resource; or null
if the assembly cannot be resolved.
- Attributes
Remarks
If the runtime class loader cannot resolve a reference to an assembly, type, or resource, the corresponding events are raised to give the callback a chance to tell the runtime which assembly the referenced assembly, type, or resource is in. It is the responsibility of the ResolveEventHandler to return the assembly that resolves the type, assembly, or resource, or to return null if the assembly is not recognized. For more information, see Resolving Assembly Loads and the AppDomain.ResourceResolve, AppDomain.AssemblyResolve, and AppDomain.ReflectionOnlyAssemblyResolve events.
Important
Beginning with the .NET Framework 4, the System.ResolveEventHandler event is raised for all assemblies, including resource assemblies. In earlier versions, the event was not raised for resource assemblies. If the operating system is localized, the handler might be called multiple times: once for each culture in the fallback chain.
Every derived class of Delegate and MulticastDelegate has a constructor and an Invoke
method. See the C++ code example in the description for the Delegate class.
Extension Methods
GetMethodInfo(Delegate) |
Gets an object that represents the method represented by the specified delegate. |