ScopesManager.GetRulesInfo 方法

搜索一键/值对规则的范围从集合中获取指定的规则的信息。

命名空间:  Microsoft.Office.Server.Search.Administration
程序集:  Microsoft.Office.Server.Search(位于 Microsoft.Office.Server.Search.dll 中)

语法

声明
Protected Function GetRulesInfo ( _
    scope As Scope, _
    ruleInfos As List(Of RuleInfo), _
    statusCode As Integer _
) As IDictionary(Of Integer, ScopeRule)
用法
Dim scope As Scope
Dim ruleInfos As List(Of RuleInfo)
Dim statusCode As Integer
Dim returnValue As IDictionary(Of Integer, ScopeRule)

returnValue = Me.GetRulesInfo(scope, _
    ruleInfos, statusCode)
protected IDictionary<int, ScopeRule> GetRulesInfo(
    Scope scope,
    List<RuleInfo> ruleInfos,
    int statusCode
)

参数

  • statusCode
    类型:System.Int32

    状态代码,指示范围是否存在。"0"表示存在的作用域。

返回值

类型:System.Collections.Generic.IDictionary<Int32, ScopeRule>
搜索规则的范围设置的键/值对。

异常

异常 条件
DeletedConcurrencyException

statusCode参数的值不等于 0。

ArgumentOutOfRangeException

在ruleInfos的一个RuleInfo对象的RuleType属性不是AllContentUrlPropertyQuery

备注

此方法创建不同类型的作用域规则根据中ruleInfos的RuleInfo对象的RuleType属性的值。

另请参阅

引用

ScopesManager 类

ScopesManager 成员

Microsoft.Office.Server.Search.Administration 命名空间