AssemblyLoadContext.GetLoadContext(Assembly) 方法

定义

获取包含指定 AssemblyAssemblyLoadContext

public:
 static System::Runtime::Loader::AssemblyLoadContext ^ GetLoadContext(System::Reflection::Assembly ^ 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
Public Shared Function GetLoadContext (assembly As Assembly) As AssemblyLoadContext

参数

assembly
Assembly

程序集。

返回

包含 assembly 的程序集加载上下文。 如果在运行时未提供 assembly,此方法会返回 NULL。

例外

assemblynull

适用于