protected EndpointDescriptionCollection GetEndpointDescriptions(
string endpointUrl,
IList<BaseAddress> baseAddresses,
StringCollection localeIds)
{
EndpointDescriptionCollection endpoints = null;
// parse the url provided by the client.
Uri parsedEndpointUrl = Utils.ParseUri(endpointUrl);
if (parsedEndpointUrl != null)
{
baseAddresses = FilterByEndpointUrl(parsedEndpointUrl, baseAddresses);
}
// check if nothing to do.
if (baseAddresses.Count != 0)
{
// localize the application name if requested.
LocalizedText applicationName = this.ServerDescription.ApplicationName;
if (localeIds != null && localeIds.Count > 0)
{
applicationName = m_serverInternal.ResourceManager.Translate(localeIds, applicationName);
}
// translate the application description.
ApplicationDescription application = TranslateApplicationDescription(
parsedEndpointUrl,
base.ServerDescription,
baseAddresses,
applicationName);
// translate the endpoint descriptions.
endpoints = TranslateEndpointDescriptions(
parsedEndpointUrl,
baseAddresses,
this.Endpoints,
application);
}
return endpoints;
}