public ArcGISLegendResponse GetLegendInfo(string serviceUrl, ICredentials credentials = null) { _webRequest = CreateRequest(serviceUrl, credentials); var response = _webRequest.GetSyncResponse(_timeOut); _legendResponse = GetLegendResponseFromWebresponse(response); return _legendResponse; }
public ArcGISLegendResponse GetLegendInfo(string serviceUrl, ICredentials credentials = null) { _webRequest = CreateRequest(serviceUrl, credentials); var response = _webRequest.GetSyncResponse(_timeOut); _legendResponse = GetLegendResponseFromWebresponse(response); return(_legendResponse); }
private void OnLegendReceived(ArcGISLegendResponse legendInfo) { var handler = LegendReceived; if (handler != null) { handler(this, legendInfo); } }
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) { OnLegendFailed(); } }
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) { OnLegendFailed(); } }
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(); } }
private void OnLegendReceived(ArcGISLegendResponse legendInfo) { var handler = LegendReceived; if (handler != null) handler(this, legendInfo); }
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(); } }