mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
refactor: Change Procesor model version to be a string, pull from CrestronEnvironment
This commit is contained in:
committed by
Chris Cameron
parent
5acfed40ba
commit
8fa1de991b
@@ -79,23 +79,11 @@ namespace ICD.Common.Utils
|
|||||||
/// Gets the processor firmware version.
|
/// Gets the processor firmware version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static Version ModelVersion
|
public static string ModelVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string versionResult = VersionResult;
|
return CrestronEnvironment.OSVersion.Firmware;
|
||||||
if (!String.IsNullOrEmpty(versionResult))
|
|
||||||
{
|
|
||||||
Regex regex = new Regex(VER_REGEX);
|
|
||||||
Match match = regex.Match(VersionResult);
|
|
||||||
|
|
||||||
if (match.Success)
|
|
||||||
return new Version(match.Groups["version"].Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
ServiceProvider.TryGetService<ILoggerService>()
|
|
||||||
.AddEntry(eSeverity.Warning, "Unable to get model version from \"{0}\"", VersionResult);
|
|
||||||
return new Version(0, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ namespace ICD.Common.Utils
|
|||||||
/// Gets the processor firmware version.
|
/// Gets the processor firmware version.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static Version ModelVersion
|
public static string ModelVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
return new Version("1.0.0.0");
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user