Share via


LocationConfigurationCollection.TryGetLocationConfigurationByInternalName Method

Retrieves the [Microsoft.Office.Server.Search.Administration.LocationConfiguration] object that matches the specified InternalName property.

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

Syntax

'Declaration
Public Function TryGetLocationConfigurationByInternalName ( _
    internalName As String, _
    <OutAttribute> ByRef configuration As LocationConfiguration _
) As Boolean
'Usage
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
)

Parameters

  • internalName
    Type: System.String
    A string that specifies the internal name of the federated search location.

Return Value

Type: System.Boolean

Remarks

The following code sample stores a location configuration for the specified internal name in the supplied LocationConfiguration object.

Examples

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

See Also

Reference

LocationConfigurationCollection Class

LocationConfigurationCollection Members

Microsoft.Office.Server.Search.Administration Namespace