本文整理汇总了C#中Microsoft.CodeAnalysis.AssemblyIdentity.GetDisplayName方法的典型用法代码示例。如果您正苦于以下问题:C# AssemblyIdentity.GetDisplayName方法的具体用法?C# AssemblyIdentity.GetDisplayName怎么用?C# AssemblyIdentity.GetDisplayName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.CodeAnalysis.AssemblyIdentity
的用法示例。
在下文中一共展示了AssemblyIdentity.GetDisplayName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ModuleData
public ModuleData(AssemblyIdentity identity, OutputKind kind, ImmutableArray<byte> image, ImmutableArray<byte> pdb, bool inMemoryModule)
{
this.Id = new ModuleDataId(identity.Name, identity.GetDisplayName(), GetMvid(image));
this.Kind = kind;
this.Image = image;
this.Pdb = pdb;
this.InMemoryModule = inMemoryModule;
}
示例2: CreateAssemblyFromIdentity
PEAssemblySymbol CreateAssemblyFromIdentity(MetadataReferenceResolver resolver, AssemblyIdentity identity, string basePath, List<PEModuleSymbol> modules)
{
PEAssemblySymbol ass;
if (!_assembliesMap.TryGetValue(identity, out ass))
{
// temporary: lookup ignoring minor version number
foreach (var pair in _assembliesMap)
{
if (pair.Key.Name.Equals(identity.Name, StringComparison.OrdinalIgnoreCase) && pair.Key.Version.Major == identity.Version.Major)
{
_assembliesMap[identity] = pair.Value;
return pair.Value;
}
}
//
string keytoken = string.Join("", identity.PublicKeyToken.Select(b => b.ToString("x2")));
var pes = resolver.ResolveReference(identity.Name + ".dll", basePath, MetadataReferenceProperties.Assembly)
.Concat(resolver.ResolveReference($"{identity.Name}/v4.0_{identity.Version}__{keytoken}/{identity.Name}.dll", basePath, MetadataReferenceProperties.Assembly));
var pe = pes.FirstOrDefault();
if (pe != null)
{
_assembliesMap[identity] = ass = PEAssemblySymbol.Create(pe);
ass.SetCorLibrary(_lazyCorLibrary);
modules.AddRange(ass.Modules.Cast<PEModuleSymbol>());
}
else
{
throw new DllNotFoundException(identity.GetDisplayName());
}
}
return ass;
}
示例3: ModuleData
public ModuleData(AssemblyIdentity identity, OutputKind kind, ImmutableArray<byte> image, ImmutableArray<byte> pdb, bool inMemoryModule)
{
this.FullName = identity.GetDisplayName();
this.Kind = kind;
this.Image = image;
this.PDB = pdb;
this.InMemoryModule = inMemoryModule;
}
示例4: Load
public override Assembly Load(AssemblyIdentity identity, string location = null)
{
return _manager.GetAssembly(identity.GetDisplayName(), reflectionOnly: false);
}