C# Class WindowsAzure.IPAddressRestriction.IPAddressRestrictionManager

ファイルを表示 Open project: sandrinodimattia/WindowsAzure-IPAddressRestriction Class Usage Examples

Public Methods

Method Description
AddRule ( Restriction restriction ) : void

Add a rule to the firewall.

Apply ( IEnumerable restrictions, bool deleteAllOtherRules = true ) : void

Apply IP Address restrictions to the firewall and remove all rules which were previously added.

ApplySettings ( string settings, bool deleteAllOtherRules = true ) : void

Apply settings to the firewall and disable all other rules matching the same ports.

DeleteRules ( ) : void

Delete rules which have been created before.

DeleteRules ( IEnumerable ruleNames ) : void

Delete rules.

DeleteRules ( List hostnameRestrictions ) : void

Delete rules.

DisableRules ( string localPort ) : void

Disabled all rules related to a specific port.

IPAddressRestrictionManager ( ) : System

Initialize the manager.

ResetDisabledRules ( ) : void

Reset all disabled rules.

Private Methods

Method Description
GetArray ( string text, char separator ) : string[]

Convert a string to an array.

GetFirewallRules ( ) : dynamic

Get the current firewall rules.

Method Details

AddRule() public method

Add a rule to the firewall.
public AddRule ( Restriction restriction ) : void
restriction Restriction
return void

Apply() public method

Apply IP Address restrictions to the firewall and remove all rules which were previously added.
public Apply ( IEnumerable restrictions, bool deleteAllOtherRules = true ) : void
restrictions IEnumerable
deleteAllOtherRules bool Delete all other rules which have been created before.
return void

ApplySettings() public method

Apply settings to the firewall and disable all other rules matching the same ports.
public ApplySettings ( string settings, bool deleteAllOtherRules = true ) : void
settings string 80=8.8.8.8,9.9.9.9;81=8.8.8.8
deleteAllOtherRules bool Delete all other rules which have been created before.
return void

DeleteRules() public method

Delete rules which have been created before.
public DeleteRules ( ) : void
return void

DeleteRules() public method

Delete rules.
public DeleteRules ( IEnumerable ruleNames ) : void
ruleNames IEnumerable
return void

DeleteRules() public method

Delete rules.
public DeleteRules ( List hostnameRestrictions ) : void
hostnameRestrictions List
return void

DisableRules() public method

Disabled all rules related to a specific port.
public DisableRules ( string localPort ) : void
localPort string
return void

IPAddressRestrictionManager() public method

Initialize the manager.
public IPAddressRestrictionManager ( ) : System
return System

ResetDisabledRules() public method

Reset all disabled rules.
public ResetDisabledRules ( ) : void
return void