SearchServiceApplicationProxy.AddScope Method
Adds a new Search scope to the Search administration database.
Namespace: Microsoft.Office.Server.Search.Administration
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Public Function AddScope ( _
scopeInfo As ScopeInfo, _
<OutAttribute> ByRef statusCode As Integer _
) As Integer
'Usage
Dim instance As SearchServiceApplicationProxy
Dim scopeInfo As ScopeInfo
Dim statusCode As Integer
Dim returnValue As Integer
returnValue = instance.AddScope(scopeInfo, _
statusCode)
public int AddScope(
ScopeInfo scopeInfo,
out int statusCode
)
Parameters
scopeInfo
Type: Microsoft.Office.Server.Search.Administration.ScopeInfoThe information about the new Search scope.
statusCode
Type: System.Int32When this method returns, it contains a number that represents the execution status. This parameter is passed uninitialized.
Return Value
Type: System.Int32
The execution result.
Implements
ISearchSiteAdministrationServiceApplication.AddScope(ScopeInfo, Int32)
Exceptions
Exception | Condition |
---|---|
Exception | An error, such as a SearchServiceApplicationFault, occurred during application execution. |
Remarks
This method returns the ID of the new Search scope if the addition is successful; otherwise, the method returns -1.
See Also
Reference
SearchServiceApplicationProxy Class