Partilhar via


CrawlRuleCollection.Test Method

Tests a specified URL against all crawl rules in the collection, and returns a CrawlRule object representing the crawl rule that was triggered for the URL.

Namespace:  Microsoft.Office.Server.Search.Administration
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
Public Function Test ( _
    url As String _
) As CrawlRule
'Usage
Dim instance As CrawlRuleCollection
Dim url As String
Dim returnValue As CrawlRule

returnValue = instance.Test(url)
public CrawlRule Test(
    string url
)

Parameters

  • url
    Type: System.String

    A string that specifies the URL to test.

Return Value

Type: Microsoft.Office.Server.Search.Administration.CrawlRule
A CrawlRule object.

Remarks

If no crawl rules are triggered by the specified URL, the Test method returns a null reference (Nothing in Visual Basic).

Use the Test() method of the CrawlRule class to test the URL against a single crawl rule.

See Also

Reference

CrawlRuleCollection Class

CrawlRuleCollection Members

Microsoft.Office.Server.Search.Administration Namespace