AssemblyLoadContext.Load(AssemblyName) 方法

定义

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

protected:
 virtual System::Reflection::Assembly ^ Load(System::Reflection::AssemblyName ^ assemblyName);
protected:
 abstract System::Reflection::Assembly ^ Load(System::Reflection::AssemblyName ^ assemblyName);
protected virtual 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
override this.Load : System.Reflection.AssemblyName -> System.Reflection.Assembly
abstract member Load : System.Reflection.AssemblyName -> System.Reflection.Assembly
Protected Overridable Function Load (assemblyName As AssemblyName) As Assembly
Protected MustOverride Function Load (assemblyName As AssemblyName) As Assembly

参数

assemblyName
AssemblyName

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

返回

Assembly

已加载程序集或为 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.

适用于