Export (0) Print
Expand All
Expand Minimize

ResolveEventHandler Delegate

Updated: December 2009

Represents the method that handles the TypeResolve, ResourceResolve, and AssemblyResolve events of an AppDomain.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

[SerializableAttribute]
[ComVisibleAttribute(true)]
public delegate Assembly ResolveEventHandler(
	Object sender,
	ResolveEventArgs args
)

Parameters

sender
Type: System.Object

The source of the event.

args
Type: System.ResolveEventArgs

A ResolveEventArgs that contains the event data.

Return Value

Type: System.Reflection.Assembly
The Assembly that resolves the type, assembly, or resource; or null if the assembly cannot be resolved.

If the runtime class loader cannot resolve a reference to an assembly, type, or resource, then 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. If the handler returns null (Nothing in Visual Basic), the load fails with an appropriate exception. For more information, see the AppDomain.ResourceResolve, AppDomain.AssemblyResolve, and AppDomain.ReflectionOnlyAssemblyResolve events.

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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Date

History

Reason

December 2009

Clarified what happens when the event handler returns null, and added links to event topics.

Customer feedback.

Community Additions

ADD
Show:
© 2014 Microsoft