Fixed a bug with pipe access permissions on non-english OS. Included Scheduler in Duplicati build, so it gets picked up by the installer. git-svn-id: https://duplicati.googlecode.com/svn/trunk@861 59da171f-624f-0410-aa54-27559c288bec
98 lines
3.5 KiB
C#
98 lines
3.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Duplicati.Scheduler.Utility
|
|
{
|
|
public static class AssemblyInfo
|
|
{
|
|
public static string Info
|
|
{
|
|
get
|
|
{
|
|
return
|
|
"AssemblyTitle: " + Title +
|
|
"\nAssemblyVersion: " + Version +
|
|
"\nAssembly: " + System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().CodeBase) + '\n';
|
|
}
|
|
}
|
|
public static string Title
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyTitleAttribute), false);
|
|
if (attributes.Length > 0)
|
|
{
|
|
System.Reflection.AssemblyTitleAttribute titleAttribute = (System.Reflection.AssemblyTitleAttribute)attributes[0];
|
|
if (titleAttribute.Title != "")
|
|
{
|
|
return titleAttribute.Title;
|
|
}
|
|
}
|
|
return System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
|
|
}
|
|
}
|
|
|
|
public static string Version
|
|
{
|
|
get
|
|
{
|
|
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
}
|
|
}
|
|
|
|
public static string AssemblyDescription
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyDescriptionAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((System.Reflection.AssemblyDescriptionAttribute)attributes[0]).Description;
|
|
}
|
|
}
|
|
|
|
public static string Product
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyProductAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((System.Reflection.AssemblyProductAttribute)attributes[0]).Product;
|
|
}
|
|
}
|
|
|
|
public static string Copyright
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyCopyrightAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((System.Reflection.AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
|
}
|
|
}
|
|
|
|
public static string Company
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(System.Reflection.AssemblyCompanyAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((System.Reflection.AssemblyCompanyAttribute)attributes[0]).Company;
|
|
}
|
|
}
|
|
}
|
|
}
|