Compartilhar via


LocationConfigurationCollection.TryGetLocationConfigurationByInternalName method

Recupera o objeto [Microsoft.Office.Server.Search.Administration.LocationConfiguration] que corresponda a propriedade especificada InternalName .

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

Syntax

'Declaração
Public Function TryGetLocationConfigurationByInternalName ( _
    internalName As String, _
    <OutAttribute> ByRef configuration As LocationConfiguration _
) As Boolean
'Uso
Dim instance As LocationConfigurationCollection
Dim internalName As String
Dim configuration As LocationConfiguration
Dim returnValue As Boolean

returnValue = instance.TryGetLocationConfigurationByInternalName(internalName, _
    configuration)
public bool TryGetLocationConfigurationByInternalName(
    string internalName,
    out LocationConfiguration configuration
)

Parâmetros

  • internalName
    Type: System.String

    Uma seqüência de caracteres que especifica o nome interno do local de pesquisa federado.

Valor retornado

Type: System.Boolean

Comentários

O exemplo de código a seguir armazena uma configuração de local para o nome interno especificado no objeto fornecido LocationConfiguration .

Examples

string locName = "location internal name";
LocationConfiguration locationConfig = null;
LocationConfigurationCollection locations =       SearchContext.Current.LocationConfigurations;
locations.TryGetLocationConfigurationByInternalName(locName, out locationConfig);

Ver também

Referência

LocationConfigurationCollection class

LocationConfigurationCollection members

Microsoft.Office.Server.Search.Administration namespace