mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 12:45:01 +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;
|
using ICD.Common.Utils.Services.Logging;
|
||||||
#if SIMPLSHARP
|
#if SIMPLSHARP
|
||||||
using Crestron.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>
|
/// <summary>
|
||||||
/// Parses the prog comments and pulls program information.
|
/// Parses the prog comments and pulls program information.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -55,6 +55,15 @@ namespace ICD.Common.Utils
|
|||||||
return Assembly.GetEntryAssembly().GetName().Name;
|
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
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user