AssemblyDependencyResolver 类

定义

允许程序根据给定程序集的依赖关系将程序集和本机库解析为路径。

public ref class AssemblyDependencyResolver sealed
public sealed class AssemblyDependencyResolver
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public sealed class AssemblyDependencyResolver
type AssemblyDependencyResolver = class
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
type AssemblyDependencyResolver = class
Public NotInheritable Class AssemblyDependencyResolver
继承
AssemblyDependencyResolver
属性

注解

AssemblyDependencyResolver 类使应用程序开发人员能够更轻松地与自定义 System.Runtime.Loader.AssemblyLoadContext 实例一起开发插件体系结构,以隔离插件,并使插件能够加载依赖项。

有关使用插件创建 .NET Core 应用程序的教程介绍了如何创建自定义应用程序,该自定义AssemblyLoadContext应用程序使用AssemblyDependencyResolver该插件解析依赖项,并正确地将插件的依赖项与托管应用程序隔离开来。

构造函数

AssemblyDependencyResolver(String)

使用组件的程序集的路径初始化 AssemblyDependencyResolver 类的新实例。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ResolveAssemblyToPath(AssemblyName)

基于组件的依赖关系解析具有给定程序集名称的程序集的路径。

ResolveUnmanagedDllToPath(String)

基于组件的依赖关系解析具有给定名称的本机库的路径。

ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于