mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
Merge remote-tracking branch 'origin/fix/VC4_Fixes' into ConnectPro_v1.2
This commit is contained in:
@@ -47,12 +47,16 @@ namespace ICD.Common.Utils
|
|||||||
public static string ModelName
|
public static string ModelName
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
{
|
||||||
|
string versionResult = VersionResult;
|
||||||
|
if (!String.IsNullOrEmpty(versionResult))
|
||||||
{
|
{
|
||||||
Regex regex = new Regex(MODEL_NAME_REGEX);
|
Regex regex = new Regex(MODEL_NAME_REGEX);
|
||||||
Match match = regex.Match(VersionResult);
|
Match match = regex.Match(versionResult);
|
||||||
|
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
return match.Groups[1].Value;
|
return match.Groups[1].Value;
|
||||||
|
}
|
||||||
|
|
||||||
ServiceProvider.TryGetService<ILoggerService>()
|
ServiceProvider.TryGetService<ILoggerService>()
|
||||||
.AddEntry(eSeverity.Warning, "Unable to get model name from \"{0}\"", VersionResult);
|
.AddEntry(eSeverity.Warning, "Unable to get model name from \"{0}\"", VersionResult);
|
||||||
@@ -67,12 +71,16 @@ namespace ICD.Common.Utils
|
|||||||
public static Version ModelVersion
|
public static Version ModelVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
{
|
||||||
|
string versionResult = VersionResult;
|
||||||
|
if (!String.IsNullOrEmpty(versionResult))
|
||||||
{
|
{
|
||||||
Regex regex = new Regex(MODEL_VERSION_REGEX);
|
Regex regex = new Regex(MODEL_VERSION_REGEX);
|
||||||
Match match = regex.Match(VersionResult);
|
Match match = regex.Match(VersionResult);
|
||||||
|
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
return new Version(match.Groups[1].Value);
|
return new Version(match.Groups[1].Value);
|
||||||
|
}
|
||||||
|
|
||||||
ServiceProvider.TryGetService<ILoggerService>()
|
ServiceProvider.TryGetService<ILoggerService>()
|
||||||
.AddEntry(eSeverity.Warning, "Unable to get model version from \"{0}\"", VersionResult);
|
.AddEntry(eSeverity.Warning, "Unable to get model version from \"{0}\"", VersionResult);
|
||||||
|
|||||||
Reference in New Issue
Block a user