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 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈