SearchServiceApplication.AddScope Method

Adds a new Search scope to the SearchAdminDatabase.

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 SearchServiceApplication
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

Return Value

Type: System.Int32
The execution result.

Implements

ISearchSiteAdministrationServiceApplication.AddScope(ScopeInfo, Int32)

Remarks

This method returns the ID of the Search scope if the addition is successful; otherwise, the method returns -1.

See Also

Reference

SearchServiceApplication Class

SearchServiceApplication Members

Microsoft.Office.Server.Search.Administration Namespace