mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
feat: Added Public API Property to get the program install date based on the creation date of core dll file for Net Standard and SimplSharp
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using ICD.Common.Utils.Services;
|
||||
using ICD.Common.Utils.IO;
|
||||
using ICD.Common.Utils.Services;
|
||||
using ICD.Common.Utils.Services.Logging;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp;
|
||||
@@ -86,6 +87,16 @@ namespace ICD.Common.Utils
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the date and time the program was installed.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[PublicAPI]
|
||||
public static DateTime ProgramInstallDate
|
||||
{
|
||||
get { return IcdFile.GetCreationTime(PathUtils.Join(PathUtils.ProgramPath, ProgramFile)); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses the prog comments and pulls program information.
|
||||
/// </summary>
|
||||
|
||||
@@ -55,6 +55,15 @@ namespace ICD.Common.Utils
|
||||
return Assembly.GetEntryAssembly().GetName().Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date and time the program was installed.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static DateTime ProgramInstallDate
|
||||
{
|
||||
get { return IcdFile.GetCreationTime(PathUtils.Join(PathUtils.ProgramPath, ProgramFile)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user