private void FinishWebRequest(IAsyncResult result)
{
try
{
var response = _webRequest.GetSyncResponse(_timeOut);
_legendResponse = GetLegendResponseFromWebresponse(response);
_webRequest.EndGetResponse(result);
if (_legendResponse == null)
OnLegendFailed();
else
OnLegendReceived(_legendResponse);
}
catch (WebException ex)
{
Logger.Log(LogLevel.Warning, ex.Message, ex);
OnLegendFailed();
}
}