96 lines
2.8 KiB
C#
96 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AlmToolkit
|
|
{
|
|
public static class Utils
|
|
{
|
|
public static string AssemblyProduct
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((AssemblyProductAttribute)attributes[0]).Product;
|
|
}
|
|
}
|
|
|
|
public static string AssemblyTitle
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
|
|
if (attributes.Length > 0)
|
|
{
|
|
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
|
|
if (titleAttribute.Title != "")
|
|
{
|
|
return titleAttribute.Title;
|
|
}
|
|
}
|
|
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
|
|
}
|
|
}
|
|
|
|
public static string AssemblyVersion
|
|
{
|
|
get
|
|
{
|
|
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
}
|
|
}
|
|
|
|
public static string AssemblyDescription
|
|
{
|
|
get
|
|
{
|
|
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
|
|
if (attributes.Length == 0)
|
|
{
|
|
return "";
|
|
}
|
|
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
|
|
}
|
|
}
|
|
|
|
public static string AlmtWebsiteUrl
|
|
{
|
|
get
|
|
{
|
|
return "http://alm-toolkit.com/";
|
|
}
|
|
}
|
|
|
|
public static string DocumentationUrl
|
|
{
|
|
get
|
|
{
|
|
return "https://github.com/microsoft/Analysis-Services/blob/master/BismNormalizer/Model%20Comparison%20and%20Merging%20for%20Analysis%20Services.pdf";
|
|
}
|
|
}
|
|
|
|
public static string LatestVersionDownloadUrl
|
|
{
|
|
get
|
|
{
|
|
return "https://github.com/microsoft/Analysis-Services/releases/latest/download/AlmToolkitSetup.msi";
|
|
}
|
|
}
|
|
|
|
public static string ReleaseHistoryUrl
|
|
{
|
|
get
|
|
{
|
|
return "https://github.com/microsoft/Analysis-Services/releases/latest";
|
|
}
|
|
}
|
|
}
|
|
}
|