本文整理汇总了C#中IMetadataHost.FindAssembly方法的典型用法代码示例。如果您正苦于以下问题:C# IMetadataHost.FindAssembly方法的具体用法?C# IMetadataHost.FindAssembly怎么用?C# IMetadataHost.FindAssembly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMetadataHost
的用法示例。
在下文中一共展示了IMetadataHost.FindAssembly方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getPhoneAssemblyReference
public static IAssemblyReference getPhoneAssemblyReference(IMetadataHost host) {
AssemblyIdentity MSPhoneAssemblyId =
new AssemblyIdentity(host.NameTable.GetNameFor("Microsoft.Phone"), "", new Version("7.0.0.0"),
new byte[] { 0x24, 0xEE, 0xC0, 0xD8, 0xC8, 0x6C, 0xDA, 0x1E }, "");
return host.FindAssembly(MSPhoneAssemblyId);
}
示例2: isURIClass
public static bool isURIClass(this ITypeReference typeRef, IMetadataHost host) {
Microsoft.Cci.Immutable.PlatformType platformType = host.PlatformType as Microsoft.Cci.Immutable.PlatformType;
if (platformType == null)
return false;
IAssemblyReference coreRef = platformType.CoreAssemblyRef;
AssemblyIdentity systemAssemblyId = new AssemblyIdentity(host.NameTable.GetNameFor("System"), "", coreRef.Version, coreRef.PublicKeyToken, "");
IAssemblyReference systemAssembly = host.FindAssembly(systemAssemblyId);
ITypeReference uriTypeRef = platformType.CreateReference(systemAssembly, "System", "Uri");
return typeRef.isClass(uriTypeRef);
}
示例3: getSystemWindowsAssemblyReference
public static IAssemblyReference getSystemWindowsAssemblyReference(IMetadataHost host) {
Microsoft.Cci.Immutable.PlatformType platform = host.PlatformType as Microsoft.Cci.Immutable.PlatformType;
IAssemblyReference coreAssemblyRef = platform.CoreAssemblyRef;
AssemblyIdentity MSPhoneSystemWindowsAssemblyId =
new AssemblyIdentity(host.NameTable.GetNameFor("System.Windows"), coreAssemblyRef.Culture, coreAssemblyRef.Version,
coreAssemblyRef.PublicKeyToken, "");
return host.FindAssembly(MSPhoneSystemWindowsAssemblyId);
}