22 namespace Deveel.Data.Util {
34 current = GetProductInfo(typeof(
Database).Assembly);
39 public string Title {
get;
private set; }
41 public string Copyright {
get;
private set; }
43 public string Company {
get;
private set; }
45 public Version Version {
get;
private set; }
47 public string Description {
get;
private set; }
52 object[] attributes = assembly.GetCustomAttributes(
false);
53 for (
int i = 0; i < attributes.Length; i++) {
54 object attr = attributes[i];
55 if (attr is AssemblyCopyrightAttribute)
56 productInfo.
Copyright = ((AssemblyCopyrightAttribute)attr).Copyright;
57 else if (attr is AssemblyVersionAttribute)
58 productInfo.
Version =
new Version(((AssemblyVersionAttribute)attr).Version);
59 else if (attr is AssemblyCompanyAttribute)
60 productInfo.
Company = ((AssemblyCompanyAttribute)attr).Company;
61 else if (attr is AssemblyTitleAttribute)
62 productInfo.
Title = ((AssemblyTitleAttribute)attr).Title;
63 else if (attr is AssemblyDescriptionAttribute)
64 productInfo.
Description = ((AssemblyDescriptionAttribute)attr).Description;
The default implementation of a database in a system.
static ProductInfo GetProductInfo(Assembly assembly)
static ProductInfo current