SearchServiceApplicationProxy.GetRulesCount 方法
检索搜索指定的搜索范围的作用域规则的数目。
命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search(位于 Microsoft.Office.Server.Search.dll 中)
语法
声明
Public Function GetRulesCount ( _
scopeId As Integer, _
<OutAttribute> ByRef statusCode As Integer _
) As Integer
用法
Dim instance As SearchServiceApplicationProxy
Dim scopeId As Integer
Dim statusCode As Integer
Dim returnValue As Integer
returnValue = instance.GetRulesCount(scopeId, _
statusCode)
public int GetRulesCount(
int scopeId,
out int statusCode
)
参数
scopeId
类型:System.Int32含有搜索的作用域规则搜索Scope对象的 ID。
statusCode
类型:System.Int32当此方法返回时,包含一个数字,表示方法的执行,其中 0 表示成功执行,而 1 表示找不到具有指定 ID 的搜索范围的状态代码。不经初始化就传递此参数。
返回值
类型:System.Int32
在搜索范围内的搜索ScopeRule对象的数目。
实现
ISearchSiteAdministrationServiceApplication.GetRulesCount(Int32, Int32)
异常
异常 | 条件 |
---|---|
TimeoutException | 操作超时已过期。 |
EndpointNotFoundException | 无法找到或到达的远程终结点。 |
Exception | 在应用程序执行期间发生错误如SearchServiceApplicationFault。 |
备注
该scopeId参数的值必须不 null 。
另请参阅
引用
SearchServiceApplicationProxy 类