AssemblyLoadContext.EnterContextualReflection 方法

定義

多載

EnterContextualReflection()

CurrentContextualReflectionContext 設定為 thisAssemblyLoadContext

EnterContextualReflection(Assembly)

CurrentContextualReflectionContext 設定為載入組件的 AssemblyLoadContext

EnterContextualReflection()

public:
 System::Runtime::Loader::AssemblyLoadContext::ContextualReflectionScope EnterContextualReflection();
public System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection ();
member this.EnterContextualReflection : unit -> System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope
Public Function EnterContextualReflection () As AssemblyLoadContext.ContextualReflectionScope

傳回

AssemblyLoadContext.ContextualReflectionScope

還原 CurrentContextualReflectionContext 上一個值的物件。 原定在 using 區塊中作為 IDisposable 使用。

備註

如需詳細資訊,請參閱 .NET Core 中的 AssemblyLoadCoNtext.CurrentCoNtextualReflectionCoNtext 設計檔

適用於

EnterContextualReflection(Assembly)

public:
 static System::Runtime::Loader::AssemblyLoadContext::ContextualReflectionScope EnterContextualReflection(System::Reflection::Assembly ^ activating);
public static System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection (System.Reflection.Assembly? activating);
static member EnterContextualReflection : System.Reflection.Assembly -> System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope
Public Shared Function EnterContextualReflection (activating As Assembly) As AssemblyLoadContext.ContextualReflectionScope

參數

activating
Assembly

用來判斷所要求 AssemblyLoadContext 執行個體的組件。

傳回

AssemblyLoadContext.ContextualReflectionScope

還原 CurrentContextualReflectionContext 上一個值的物件。 原定在 using 區塊中作為 IDisposable 使用。

備註

如需詳細資訊,請參閱 .NET Core 中的 AssemblyLoadCoNtext.CurrentCoNtextualReflectionCoNtext 設計檔

適用於