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.
|
||||
/// </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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user