INavigationInterceptorRemoveRules Method (String)Awesomium.NET 1.7.6Awesomium.NET
Remove any of the currently applied filtering rules, that match a given filter pattern.

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version: 1.7.6.0
Syntax

int RemoveRules(
	string pattern
)

Parameters

pattern
Type: SystemString
A navigation filter pattern. Can contain wildcards.

Return Value

Type: Int32
The number of rules that were removed.
Remarks

Note Note
All filtering rules that match the given pattern will be removed, irrespective of the navigation rule (Allow or Deny) applied to them.
Examples

This example demonstrates removing matching navigation rules from a INavigationInterceptor.
C#
// 1.
navigationInterceptor.AddRule( @"http?://*.somedomain.info/*", NavigationRule.Deny );
// 2.
navigationInterceptor.AddRule( @"http?://*.somedomain.com/*", NavigationRule.Deny );
// 3.
navigationInterceptor.AddRule( @"http?://*admin.somedomain.info/*", NavigationRule.Allow );
// 4.
navigationInterceptor.AddRule( @"http?://*admin.somedomain.com/*", NavigationRule.Allow );
// 5.
// Rules 2 and 4 will be removed.
int res = navigationInterceptor.RemoveRules( @"http?://*domain.com/*" );
Console.WriteLine( res.ToString() );
Output:
            2
            
See Also

Reference