public string[] syncCardCache(bool forceUpdate, string url, HicapsConnectControl.HicapsConnectControl hicaps) { if (forceUpdate) { HicapsConnectControl.HicapsConnectControl.CardListRequest myRequest = new HicapsConnectControl.HicapsConnectControl.CardListRequest(); myRequest.ServerUrl = url; HicapsConnectControl.HicapsConnectControl.CardListResponse myBo = hicaps.sendCardList(myRequest); return(syncCardCache(myBo, true, url)); } else { HicapsConnectControl.HicapsConnectControl.CardListResponse myBo = new HicapsConnectControl.HicapsConnectControl.CardListResponse(); return(syncCardCache(myBo, false, url)); } }
public string[] syncCardCache(HicapsConnectControl.HicapsConnectControl.CardListResponse myBo, bool forceUpdate, string url) { if (!File.Exists(getProviderCacheFilename(url)) || forceUpdate) { IEnumerable <string> list = myBo.CardFundDetails .Where(line => line.Length > 6) .Select(line => line.Substring(0, 6).Trim() + "|" + line.Substring(6)); createCardCacheFile(list.ToArray(), url); return(list.ToArray()); } else { return(getProviderCacheFile(url)); } }