Пример #1
0
        public async Task <IEnumerable <AsycudaDocument> > GetAsycudaDocumentsByExpressionLst(List <string> expLst, List <string> includesLst = null)
        {
            if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime || expLst.Count == 0 || expLst.FirstOrDefault() == "None")
            {
                return(new List <AsycudaDocument>().AsEnumerable());
            }
            try
            {
                using (var t = new AsycudaDocumentClient())
                {
                    IEnumerable <DTO.AsycudaDocument> res = null;

                    res = await t.GetAsycudaDocumentsByExpressionLst(expLst, includesLst).ConfigureAwait(continueOnCapturedContext: false);


                    if (res != null)
                    {
                        return(res.Select(x => new AsycudaDocument(x)).AsEnumerable());
                    }
                    else
                    {
                        return(null);
                    }
                }
            }
            catch (FaultException <ValidationFault> e)
            {
                throw new Exception(e.Detail.Message, e.InnerException);
            }
            catch (Exception)
            {
                Debugger.Break();
                throw;
            }
        }