fix: catch PlatformNotSupportedException for linux systems

This commit is contained in:
Jeffery Thompson
2020-01-22 14:42:30 -05:00
parent 80786dd84c
commit 9cdc8b26a2

View File

@@ -56,6 +56,8 @@ namespace ICD.Common.Utils
public static string DhcpStatus
{
get
{
try
{
bool enabled =
NetworkInterface.GetAllNetworkInterfaces()
@@ -66,6 +68,11 @@ namespace ICD.Common.Utils
return enabled.ToString();
}
catch(PlatformNotSupportedException)
{
return false.ToString();
}
}
}
/// <summary>