AssemblyLoadContext.GetLoadContext(Assembly) AssemblyLoadContext.GetLoadContext(Assembly) AssemblyLoadContext.GetLoadContext(Assembly) Method

定义

获取包含指定 AssemblyAssemblyLoadContextGets the AssemblyLoadContext containing the specified Assembly.

public:
 static System::Runtime::Loader::AssemblyLoadContext ^ GetLoadContext(System::Reflection::Assembly ^ assembly);
public static System.Runtime.Loader.AssemblyLoadContext GetLoadContext (System.Reflection.Assembly assembly);
static member GetLoadContext : System.Reflection.Assembly -> System.Runtime.Loader.AssemblyLoadContext

参数

assembly
Assembly Assembly Assembly

程序集。An assembly.

返回

包含 assembly 的程序集加载上下文。The assembly load context containing the assembly. 如果在运行时未提供 assembly,此方法会返回 NULL。If the assembly is not provided by the runtime, this method returns null.

异常

assemblynullassembly is null.

适用于