Skip to content

Commit

Permalink
Updated for nullability warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dahall committed Oct 11, 2022
1 parent df1702b commit 66c6e83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions System/Network/WindowsFirewall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ internal FirewallProfile(INetFwPolicy2 item, NET_FW_PROFILE_TYPE2 type)
/// </remarks>
public string[]? ExcludedInterfaces
{
get => iPol.ExcludedInterfaces[type] is null ? null : Array.ConvertAll((object[])iPol.ExcludedInterfaces[type], o => o.ToString());
get => iPol.ExcludedInterfaces[type] is null ? null : (string[]?)Array.ConvertAll((object[])iPol.ExcludedInterfaces[type], o => o.ToString());
set => iPol.ExcludedInterfaces[type] = value is null || value.Length == 0 ? null : Array.ConvertAll(value, s => (object)s);
}

Expand Down Expand Up @@ -624,7 +624,7 @@ public FirewallRule(string name, string? group, bool allow = true, bool @in = tr
/// </remarks>
public string[]? InterfaceNames
{
get => iRule.Interfaces is null ? null : Array.ConvertAll((object[])iRule.Interfaces, o => o.ToString());
get => iRule.Interfaces is null ? null : (string[]?)Array.ConvertAll((object[])iRule.Interfaces, o => o.ToString());
set => iRule.Interfaces = value is null || value.Length == 0 ? null : Array.ConvertAll(value, s => (object)s);
}

Expand Down

0 comments on commit 66c6e83

Please sign in to comment.