/// <summary>Initializes a new instance of the <see cref="ServiceProgram"/> class.</summary> public ServiceProgram() : base() { log.LogInfo("Initializing Service instance."); AppDomain.CurrentDomain.UnhandledException += UnhandledException; var type = GetType(); VersionInfo = AssemblyVersionInfo.FromAssembly(type.Assembly); ServiceName = StringExtensions.ReplaceInvalidChars(VersionInfo.Product, ASCII.Strings.Letters + ASCII.Strings.Digits + "_", "_"); }
static void Header() { if (m_HeaderDisplayed) { return; } m_HeaderDisplayed = true; if (Quiet) { return; } AssemblyVersionInfo v = AssemblyVersionInfo.FromAssembly(typeof(Program).Assembly); Log.LogInfo("<yellow>" + v.Title + "<cyan> v" + v.AssemblyVersion + " <default>" + v.Configuration + " " + v.FileVersion + " " + v.Copyright + "\n\n"); }