Modifier

Partager via


XamlSchemaContext.OnAssemblyResolve(String) Method

Definition

Called when operations use this schema context to resolve an assembly that is required in order to resolve the XAML namespaces that it contains.

protected public:
 virtual System::Reflection::Assembly ^ OnAssemblyResolve(System::String ^ assemblyName);
protected internal virtual System.Reflection.Assembly OnAssemblyResolve (string assemblyName);
abstract member OnAssemblyResolve : string -> System.Reflection.Assembly
override this.OnAssemblyResolve : string -> System.Reflection.Assembly
Protected Friend Overridable Function OnAssemblyResolve (assemblyName As String) As Assembly

Parameters

assemblyName
String

The name of the assembly to load.

Returns

The resolved assembly.

Remarks

The underlying assembly resolution technique, which is an internal API, has built-in tolerances for different string forms of an assembly name as based on the AssemblyName construction behavior.

The purpose of this API is to enable first-opportunity resolution against known sets of assemblies, such as against reference assemblies instead of against a global assembly cache. If the list of reference assemblies is populated, the default implementation can access the known reference assemblies.

Applies to