本文整理汇总了C#中System.Reflection.Assembly.GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.GetTitle方法的具体用法?C# Assembly.GetTitle怎么用?C# Assembly.GetTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Reflection.Assembly
的用法示例。
在下文中一共展示了Assembly.GetTitle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AsmInfo
/// <summary>
/// Constructor
/// </summary>
/// <param name="assembly"></param>
public AsmInfo(Assembly assembly) {
assembly.ShouldNotBeNull("assembly");
FullName = assembly.FullName;
AssemblyName = assembly.GetName();
// NOTE : CodeBase는 동적으로 Loading 한 Assembly에 대해서는 값을 조회할 수 없다.
// this.CodeBase = assembly.CodeBase;
Company = assembly.GetCompany();
Configuration = assembly.GetConfiguration();
Copyright = assembly.GetCopyright();
Culture = assembly.GetCulture();
DefaultAlias = assembly.GetDefaultAlias();
Description = assembly.GetDescription();
InfomationalVersion = assembly.GetInformationalVersion();
Product = assembly.GetProduct();
Title = assembly.GetTitle();
Trademark = assembly.GetTrandemark();
Version = AssemblyName.Version;
Win32FileVersion = assembly.GetFileVersion();
}
示例2: CreateToolTip
private string CreateToolTip(Assembly assembly)
{
return string.Format("{0} {1}\r\n{2}",
assembly.GetTitle(true), assembly.GetName().Version.ToString(), assembly.GetDescription());
}
示例3: CreateItem
private ListViewItem CreateItem(Assembly assembly)
{
try
{
var title = assembly.GetTitle(true);
var version = assembly.GetName().Version.ToString();
var path = assembly.GetLocation();
var item = new ListViewItem();
item.Text = title;
item.Tag = assembly;
item.SubItems.Add(version);
item.SubItems.Add(path);
// ODT: this seems not to work properly: no tooltips are displayed...
item.ToolTipText = string.Format("{0} {1}\r\n{2}",
title, version, assembly.GetDescription());
return item;
}
catch (Exception ex)
{
This.Logger.Error(ex);
return null;
}
}
示例4: GetAssemblyTitle
private string GetAssemblyTitle(Assembly assembly)
{
return assembly.GetTitle(true);
}
示例5: WriteWelcomeMessage
private static void WriteWelcomeMessage(Assembly asm)
{
Console.WriteLine();
Console.WriteLine("{0}. v{1}", asm.GetTitle(), asm.GetVersion());
Console.WriteLine(asm.GetDescription());
Console.WriteLine();
}