refactor: Change Procesor model version to be a string, pull from CrestronEnvironment

This commit is contained in:
Drew Tingen
2020-11-19 09:49:37 -05:00
committed by Chris Cameron
parent 5acfed40ba
commit 8fa1de991b
2 changed files with 4 additions and 16 deletions

View File

@@ -79,23 +79,11 @@ namespace ICD.Common.Utils
/// Gets the processor firmware version.
/// </summary>
[PublicAPI]
public static Version ModelVersion
public static string ModelVersion
{
get
{
string versionResult = VersionResult;
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);
return CrestronEnvironment.OSVersion.Firmware;
}
}

View File

@@ -18,12 +18,12 @@ namespace ICD.Common.Utils
/// Gets the processor firmware version.
/// </summary>
[PublicAPI]
public static Version ModelVersion
public static string ModelVersion
{
get
{
// TODO
return new Version("1.0.0.0");
return null;
}
}