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.StringA string that specifies the internal name of the federated search location.
configuration
Type: Microsoft.Office.Server.Search.Administration.LocationConfigurationA LocationConfiguration object that contains the location configuration returned by this method.
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