public async Task <IEnumerable <ContainerEntryData> > ContainerEntryDatas(List <string> includesLst = null) { if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime) { return(new List <ContainerEntryData>().AsEnumerable()); } try { using (var t = new ContainerEntryDataClient()) { var res = await t.GetContainerEntryDatas(includesLst).ConfigureAwait(continueOnCapturedContext: false); if (res != null) { return(res.Select(x => new ContainerEntryData(x)).AsEnumerable()); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }
public async Task <IEnumerable <ContainerEntryData> > GetContainerEntryDatasByExpressionNav(string exp, Dictionary <string, string> navExp, List <string> includesLst = null) { if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime || exp == null || exp == "None") { return(new List <ContainerEntryData>().AsEnumerable()); } try { using (var t = new ContainerEntryDataClient()) { IEnumerable <DTO.ContainerEntryData> res = null; if (exp == "All" && navExp.Count == 0) { res = await t.GetContainerEntryDatas(includesLst).ConfigureAwait(continueOnCapturedContext: false); } else { res = await t.GetContainerEntryDatasByExpressionNav(exp, navExp, includesLst).ConfigureAwait(continueOnCapturedContext: false); } if (res != null) { return(res.Select(x => new ContainerEntryData(x)).AsEnumerable()); } else { return(null); } } } catch (FaultException <ValidationFault> e) { throw new Exception(e.Detail.Message, e.InnerException); } catch (Exception) { Debugger.Break(); throw; } }