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.StringUma seqüência de caracteres que especifica o nome interno do local de pesquisa federado.
configuration
Type: Microsoft.Office.Server.Search.Administration.LocationConfigurationUm objeto LocationConfiguration que contém a configuração de local retornada por esse método.
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