다음을 통해 공유


ISearchSiteAdministrationServiceApplication.AddScope Method

Adds a new Search scope to the database.

Namespace:  Microsoft.Office.Server.Search.Administration
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
<OperationContractAttribute> _
Function AddScope ( _
    scopeInfo As ScopeInfo, _
    <OutAttribute> ByRef statusCode As Integer _
) As Integer
'Usage
Dim instance As ISearchSiteAdministrationServiceApplication
Dim scopeInfo As ScopeInfo
Dim statusCode As Integer
Dim returnValue As Integer

returnValue = instance.AddScope(scopeInfo, _
    statusCode)
[OperationContractAttribute]
int AddScope(
    ScopeInfo scopeInfo,
    out int statusCode
)

Parameters

Return Value

Type: System.Int32
The execution result.

Remarks

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

Implementing classes should set statusCode to 0 to indicate successful execution and 1 otherwise.

See Also

Reference

ISearchSiteAdministrationServiceApplication Interface

ISearchSiteAdministrationServiceApplication Members

Microsoft.Office.Server.Search.Administration Namespace