Share via


ScopesManager.ConstructRuleFromRuleInfo Method

Creates a Search scope rule with specified Search scope rule information.

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

Syntax

'Declaration
Protected Function ConstructRuleFromRuleInfo ( _
    scope As Scope, _
    ruleInfo As RuleInfo, _
    ruleId As Integer _
) As ScopeRule
'Usage
Dim scope As Scope
Dim ruleInfo As RuleInfo
Dim ruleId As Integer
Dim returnValue As ScopeRule

returnValue = Me.ConstructRuleFromRuleInfo(scope, _
    ruleInfo, ruleId)
protected ScopeRule ConstructRuleFromRuleInfo(
    Scope scope,
    RuleInfo ruleInfo,
    int ruleId
)

Parameters

  • ruleId
    Type: System.Int32

    The identifier of the Search scope rule.

Return Value

Type: Microsoft.Office.Server.Search.Administration.ScopeRule
A Search scope rule.

Exceptions

Exception Condition
DeletedConcurrencyException

The IsDeleted property of ruleInfo is true.

ArgumentOutOfRangeException

The RuleType property of ruleInfo is not AllContent or Url or PropertyQuery.

Remarks

This method creates different types of Search scope rules based on the value of the RuleType property of ruleInfo.

See Also

Reference

ScopesManager Class

ScopesManager Members

Microsoft.Office.Server.Search.Administration Namespace