public DataLayerResult DoResponse(IDataLayer dataLayer, Object response) { GetAllHostInfoResponse res = (GetAllHostInfoResponse)response; dataLayer.HostInfoList.Clear(); if (res.allHostInfo != null) { HostInfo[] hostInfoArray = res.allHostInfo; for (int i = 0; i < hostInfoArray.Length; i++) { dataLayer.HostInfoList.Add(hostInfoArray[i].hostId, hostInfoArray[i]); } } return(DataLayerResult.Success); }
public DataLayerResult GetAllHostInfo() { GetAllHostInfoRequest req = new GetAllHostInfoRequest(); GetAllHostInfoResponse res = null; try { res = m_WsSysguard.GetAllHostInfo(req); connStateManager.Connection(); return(stateProcessor.MakeDataLayerResult <GetAllHostInfoResponse>(this, res)); } catch (Exception ex) { return(HandleException(ex)); } }