AssemblyLoadContext.Load(AssemblyName) AssemblyLoadContext.Load(AssemblyName) AssemblyLoadContext.Load(AssemblyName) Method

定义

当在派生类中重写时,允许根据其 AssemblyName 解析和加载程序集。When overridden in a derived class, allows an assembly to be resolved and loaded based on its AssemblyName.

protected:
 abstract System::Reflection::Assembly ^ Load(System::Reflection::AssemblyName ^ assemblyName);
protected abstract System.Reflection.Assembly Load (System.Reflection.AssemblyName assemblyName);
abstract member Load : System.Reflection.AssemblyName -> System.Reflection.Assembly

参数

assemblyName
AssemblyName AssemblyName AssemblyName

描述要加载的程序集的对象。The object that describes the assembly to be loaded.

返回

已加载程序集或为 nullThe loaded assembly, or null.

注解

在程序集解析期间Load(AssemblyName)方法具有程序集名称解析为加载的程序集的第一次机会。During assembly resolution, the Load(AssemblyName) method has the first chance to resolve the assembly name to a loaded assembly. 它可以加载程序集,也可以返回nullIt can either load an assembly or return null. 如果它返回null,解析过程将继续。If it returns null, the resolution process continues. 请参阅LoadFromAssemblyName(AssemblyName)为完整的过程的描述。See LoadFromAssemblyName(AssemblyName) for the full process description.

重要

若要防止递归堆栈溢出,不要调用此实例的LoadFromAssemblyName(AssemblyName)从此方法的方法。To prevent recursive stack overflow, do not call this instance's LoadFromAssemblyName(AssemblyName) method from this method.

适用于