mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 04:35:00 +00:00
Splitting ProgramUtils into NetStandard portion
This commit is contained in:
66
ICD.Common.Utils/ProgramUtils.Standard.cs
Normal file
66
ICD.Common.Utils/ProgramUtils.Standard.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
#if !SIMPLSHARP
|
||||
using ICD.Common.Properties;
|
||||
using ICD.Common.Utils.IO;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace ICD.Common.Utils
|
||||
{
|
||||
public static partial class ProgramUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the program number.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static uint ProgramNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the compile date of the program.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static string CompiledDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return IcdFile.GetLastWriteTime(Assembly.GetEntryAssembly().Location).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the compiler revision version.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static Version CompilerRevision
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetEntryAssembly().GetName().Version;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the program dll.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static string ProgramFile { get { return IcdPath.GetFileName(Assembly.GetEntryAssembly().Location); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the application.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static string ApplicationName
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetEntryAssembly().GetName().Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user