SearchContext.GetContext 方法 (ServerContext)
请注意:此 API 现在已过时。
获取搜索上下文实例的ServerContext对象。
命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search(位于 Microsoft.Office.Server.Search.dll 中)
语法
声明
<ObsoleteAttribute("This method is deprecated. Use GetContext(SearchServiceApplication app).")> _
Public Shared Function GetContext ( _
serverContext As ServerContext _
) As SearchContext
用法
Dim serverContext As ServerContext
Dim returnValue As SearchContext
returnValue = SearchContext.GetContext(serverContext)
[ObsoleteAttribute("This method is deprecated. Use GetContext(SearchServiceApplication app).")]
public static SearchContext GetContext(
ServerContext serverContext
)
参数
serverContext
类型:Microsoft.Office.Server.ServerContext一个表示服务器上下文的共享服务提供程序的ServerContext对象。
返回值
类型:Microsoft.Office.Server.Search.Administration.SearchContext
表示搜索上下文共享服务提供程序为一个SearchContext对象。
备注
有关SearchContext类和SharePoint 企业级搜索的管理对象模型的详细信息,请参阅Getting Started with the Search Administration Object Model和How to: Return the Search Context for the Search Service Provider。