beagle r4409 - trunk/beagle/Util



Author: dbera
Date: Tue Jan 22 00:22:23 2008
New Revision: 4409
URL: http://svn.gnome.org/viewvc/beagle?rev=4409&view=rev

Log:
Allow assemblies to have a non-Novell copyright information.


Modified:
   trunk/beagle/Util/VersionFu.cs

Modified: trunk/beagle/Util/VersionFu.cs
==============================================================================
--- trunk/beagle/Util/VersionFu.cs	(original)
+++ trunk/beagle/Util/VersionFu.cs	Tue Jan 22 00:22:23 2008
@@ -33,6 +33,8 @@
 	
 	public static class VersionFu {
 		
+		const string DefaultCopyright = "Copyright (C) 2004-2007 Novell, Inc.";
+
 		public static void PrintHeader (Assembly a)
 		{
 			// Retrieves name and description that are stored as assembly
@@ -44,6 +46,7 @@
 
 			AssemblyTitleAttribute title = (AssemblyTitleAttribute) Attribute.GetCustomAttribute (a, typeof (AssemblyTitleAttribute));
 			AssemblyDescriptionAttribute desc = (AssemblyDescriptionAttribute) Attribute.GetCustomAttribute (a, typeof (AssemblyDescriptionAttribute));
+			AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute) Attribute.GetCustomAttribute (a, typeof (AssemblyCopyrightAttribute));
 
 			StringBuilder text = new StringBuilder ();
 			
@@ -51,7 +54,7 @@
 				text.AppendFormat ("{0}: {1}.\n", title.Title, desc.Description);
 
 			text.Append ("Web page: http://www.beagle-project.org/\n";);
-			text.Append ("Copyright (C) 2004-2007 Novell, Inc.\n");
+			text.Append (copyright == null ? DefaultCopyright : copyright.Copyright);
 
 			Console.WriteLine (text);
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]