Partager via


HostDistributionRuleCollection.EditRule Method

Edits the specified HostDistributionRule in the Search service application.

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

Syntax

'Declaration
Public Sub EditRule ( _
    curHostName As String, _
    curCrawlDatabaseGuid As Guid, _
    newHostName As String, _
    newCrawlDatabaseGuid As Guid _
)
'Usage
Dim instance As HostDistributionRuleCollection
Dim curHostName As String
Dim curCrawlDatabaseGuid As Guid
Dim newHostName As String
Dim newCrawlDatabaseGuid As Guid

instance.EditRule(curHostName, curCrawlDatabaseGuid, _
    newHostName, newCrawlDatabaseGuid)
public void EditRule(
    string curHostName,
    Guid curCrawlDatabaseGuid,
    string newHostName,
    Guid newCrawlDatabaseGuid
)

Parameters

Exceptions

Exception Condition
Exception

Edit operation failed.

Remarks

This method removes the HostDistributionRule specified by the curHostName and curCrawlDatabaseGuid from the Search service application and adds a new HostDistributionRule with the newHostName and newCrawlDatabaseGuid.

See Also

Reference

HostDistributionRuleCollection Class

HostDistributionRuleCollection Members

Microsoft.Office.Server.Search.Administration Namespace