mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
fix: catch PlatformNotSupportedException for linux systems
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user