fix: VC4 Compat Fixes

This commit is contained in:
Drew Tingen
2019-03-09 14:51:44 -05:00
parent e90914664f
commit 158c261d19

View File

@@ -47,12 +47,16 @@ namespace ICD.Common.Utils
public static string ModelName
{
get
{
string versionResult = VersionResult;
if (!String.IsNullOrEmpty(versionResult))
{
Regex regex = new Regex(MODEL_NAME_REGEX);
Match match = regex.Match(VersionResult);
Match match = regex.Match(versionResult);
if (match.Success)
return match.Groups[1].Value;
}
ServiceProvider.TryGetService<ILoggerService>()
.AddEntry(eSeverity.Warning, "Unable to get model name from \"{0}\"", VersionResult);
@@ -67,12 +71,16 @@ namespace ICD.Common.Utils
public static Version ModelVersion
{
get
{
string versionResult = VersionResult;
if (!String.IsNullOrEmpty(versionResult))
{
Regex regex = new Regex(MODEL_VERSION_REGEX);
Match match = regex.Match(VersionResult);
if (match.Success)
return new Version(match.Groups[1].Value);
}
ServiceProvider.TryGetService<ILoggerService>()
.AddEntry(eSeverity.Warning, "Unable to get model version from \"{0}\"", VersionResult);