Class WindowsFirewallRuleCollection
- Namespace
- CENTREL.XIA.Configuration.Types
- Assembly
- CENTREL.XIA.Configuration.Types.dll
Represents a collection of Windows Firewall rules.
public class WindowsFirewallRuleCollection : Collection<WindowsFirewallRule>, IList<WindowsFirewallRule>, ICollection<WindowsFirewallRule>, IList, ICollection, IReadOnlyList<WindowsFirewallRule>, IReadOnlyCollection<WindowsFirewallRule>, IEnumerable<WindowsFirewallRule>, IEnumerable
- Inheritance
-
WindowsFirewallRuleCollection
- Implements
- Inherited Members
Remarks
NOTE: Multiple firewall rules can be configured with the same name.
Constructors
WindowsFirewallRuleCollection()
Initializes a new instance of the CENTREL.XIA.Configuration.Types.WindowsFirewallRuleCollection class.
public WindowsFirewallRuleCollection()
Methods
FindByIdentifier(Guid)
Returns the Windows Firewall rule with the specified identifier, or null if no rule with that identifier is found in the collection.
public WindowsFirewallRule FindByIdentifier(Guid identifier)
Parameters
identifier
GuidThe identifier in GUID format.
Returns
- WindowsFirewallRule
The CENTREL.XIA.Configuration.Types.WindowsFirewallRule with the specified identifier.
FindByProfile(WindowsFirewallRuleProfileTypes)
Gets the Windows Firewall rules that are configured for the specified Windows Firewall profile type.
public WindowsFirewallRuleCollection FindByProfile(WindowsFirewallRuleProfileTypes profileTypes)
Parameters
profileTypes
WindowsFirewallRuleProfileTypesThe Windows Firewall profile types for which rules should be found.
Returns
- WindowsFirewallRuleCollection
A CENTREL.XIA.Configuration.Types.WindowsFirewallRuleCollection containing the matching rules.
Sort()
Sorts the values in the collection.
public void Sort()