/// <summary> /// Listeleri asenkron olarak doldurma işleminin başladığı metot, /// ReaderService'i kullanır /// </summary> /// <returns></returns> private int Start() { try { isStarted = true; GetFirmsDelegate getFirms = ReaderService.getFirmListByXML; GetTelsDelegate getTels = ReaderService.getTelListFromDB; GetMailsDelegate getMails = ReaderService.getMailListFromDB; IAsyncResult firmResult = getFirms.BeginInvoke(null, null); IAsyncResult telResult = getTels.BeginInvoke(null, null); IAsyncResult mailResult = getMails.BeginInvoke(null, null); FirmList = getFirms.EndInvoke(firmResult); TelNumberListFromDB = getTels.EndInvoke(telResult); EmailListFromDB = getMails.EndInvoke(mailResult); if (FirmList != null && TelNumberListFromDB != null) { Mapping(); } } catch (Exception e) { PrintConsole.LOG(e.StackTrace, e.Message); } return(1); }
/// <summary> /// FirmList'i asenkron olarak doldurma isleminin basladigi metot, /// ReaderService'i kullanır /// </summary> /// <returns></returns> public int Start() { try { GetFirmsDelegate getFirms = ReaderService.getFirmListByXML; IAsyncResult firmResult = getFirms.BeginInvoke(null, null); FirmList = getFirms.EndInvoke(firmResult); if (FirmList != null) { Mapping(); } else { throw new Exception("FirmListCount are null"); } } catch (Exception e) { PrintConsole.LOG(e.StackTrace, e.Message); } return(1); }