MetadataLoadContext.LoadFromAssemblyName Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
LoadFromAssemblyName(AssemblyName) |
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver. |
LoadFromAssemblyName(String) |
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver. |
LoadFromAssemblyName(AssemblyName)
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver.
public:
System::Reflection::Assembly ^ LoadFromAssemblyName(System::Reflection::AssemblyName ^ assemblyName);
public System.Reflection.Assembly LoadFromAssemblyName (System.Reflection.AssemblyName assemblyName);
member this.LoadFromAssemblyName : System.Reflection.AssemblyName -> System.Reflection.Assembly
Public Function LoadFromAssemblyName (assemblyName As AssemblyName) As Assembly
Parameters
- assemblyName
- AssemblyName
An AssemblyName instance.
Returns
An Assembly instance.
Exceptions
The resolver returns null
.
Remarks
Note that the behavior of this method matches the behavior of the AssemblyLoadContext.LoadFromAssemblyName resolve event, but does not match the behavior of Assembly.ReflectionOnlyLoad. (The latter gives up without raising its resolve event.)
Applies to
LoadFromAssemblyName(String)
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
- Source:
- MetadataLoadContext.Apis.cs
Resolves the supplied assembly name to an assembly. If an assembly was previously bound to this name, that assembly is returned. Otherwise, the MetadataLoadContext calls the specified MetadataAssemblyResolver.
public:
System::Reflection::Assembly ^ LoadFromAssemblyName(System::String ^ assemblyName);
public System.Reflection.Assembly LoadFromAssemblyName (string assemblyName);
member this.LoadFromAssemblyName : string -> System.Reflection.Assembly
Public Function LoadFromAssemblyName (assemblyName As String) As Assembly
Parameters
Returns
An Assembly instance.
Exceptions
The resolver returns null
.
Remarks
Note that the behavior of this method matches the behavior of the AssemblyLoadContext.LoadFromAssemblyName resolve event but does not match the behavior of Assembly.ReflectionOnlyLoad. (The latter gives up without raising its resolve event.)
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應