StrongAssemblyIdentity.CreateFrom 方法

定义

重载

CreateFrom(Assembly, AssemblyName)

从程序集中获取元数据。

CreateFrom(String, AssemblyName)

获取指定路径中的程序集的元数据。

CreateFrom(Assembly, AssemblyName)

从程序集中获取元数据。

public static Microsoft.VisualStudio.Composition.StrongAssemblyIdentity CreateFrom (System.Reflection.Assembly assembly, System.Reflection.AssemblyName assemblyName);
static member CreateFrom : System.Reflection.Assembly * System.Reflection.AssemblyName -> Microsoft.VisualStudio.Composition.StrongAssemblyIdentity

参数

assembly
Assembly

要从中读取元数据的程序集。

assemblyName
AssemblyName

一个可选 AssemblyName 的,它可能对动态程序集查找其代码库很重要。

返回

StrongAssemblyIdentity

程序集元数据。

适用于

CreateFrom(String, AssemblyName)

获取指定路径中的程序集的元数据。

public static Microsoft.VisualStudio.Composition.StrongAssemblyIdentity CreateFrom (string assemblyFile, System.Reflection.AssemblyName assemblyName);
static member CreateFrom : string * System.Reflection.AssemblyName -> Microsoft.VisualStudio.Composition.StrongAssemblyIdentity

参数

assemblyFile
String

要从中读取元数据的程序集的路径。

assemblyName
AssemblyName

如果已知,则为程序集名称;否则 为 null

返回

StrongAssemblyIdentity

程序集元数据。

例外

assemblyFile 未引用现有文件时引发。

适用于