コード例 #1
0
ファイル: AsmInfo.cs プロジェクト: debop/NFramework
        /// <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
0
 private string CreateToolTip(Assembly assembly)
 {
     return string.Format("{0} {1}\r\n{2}",
         assembly.GetTitle(true), assembly.GetName().Version.ToString(), assembly.GetDescription());
 }
コード例 #3
0
        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
0
 private string GetAssemblyTitle(Assembly assembly)
 {
     return assembly.GetTitle(true);
 }
コード例 #5
0
ファイル: Program.cs プロジェクト: modulexcite/WebSync
 private static void WriteWelcomeMessage(Assembly asm)
 {
     Console.WriteLine();
     Console.WriteLine("{0}. v{1}", asm.GetTitle(), asm.GetVersion());
     Console.WriteLine(asm.GetDescription());
     Console.WriteLine();
 }