Пример #1
0
 public virtual void LookUpAndInitProducts(IProductLookUp lookUp)
 {
     Products =
         lookUp.GetProductNameList()
         .Select(lookUp.GetProductFromProductName).Distinct()
         .Where(p => p != null).OrderBy(p => p);
 }
Пример #2
0
        public virtual void LookUpAndInitProducts(IProductLookUp lookUp)
        {
            var newProducts = lookUp.GetProductNameList()
                              .Select(lookUp.GetProductFromProductName).Distinct()
                              .Where(p => p != null).OrderBy(p => p);

            Products = Products == null ? newProducts : Products.Concat(newProducts);
        }
Пример #3
0
        private static IEnumerable <IInstalledProduct> LookUpDynamoProducts(IProductLookUp lookUp)
        {
            yield return(lookUp.GetProductFromInstallPath(DYNAMO063)); //Look up 0.6.3

            yield return(lookUp.GetProductFromInstallPath(dynamo07X)); //

            yield return(lookUp.GetProductFromProductCode(PRODUCT_ID07_X));

            foreach (var product in lookUp.GetProductNameList())
            {
                yield return(lookUp.GetProductFromProductName(product));
            }
        }
Пример #4
0
        public virtual void LookUpAndInitProducts(IProductLookUp lookUp)
        {
            var newProductTuples = lookUp.GetProductNameList().Select(x => (DisplayName: x, ProductKey: string.Empty));

            if (lookUp is InstalledProductLookUp lookupAsInstalledProduct)
            {
                newProductTuples = lookupAsInstalledProduct.GetProductNameAndCodeList();
            }

            var returnProducts = newProductTuples.Select(prod =>
            {
                var product = lookUp.GetProductFromProductName(prod.DisplayName);
                if (product == null)
                {
                    product = lookUp.GetProductFromProductCode(prod.ProductKey);
                }
                return(product);
            }).Distinct().Where(p => p != null).OrderBy(p => p);

            Products = Products == null ? returnProducts : Products.Concat(returnProducts);
        }
Пример #5
0
 private static IEnumerable<IInstalledProduct> LookUpDynamoProducts(IProductLookUp lookUp)
 {
     yield return lookUp.GetProductFromInstallPath(DYNAMO063); //Look up 0.6.3
     yield return lookUp.GetProductFromInstallPath(dynamo07X); //
     yield return lookUp.GetProductFromProductCode(PRODUCT_ID07_X);
     foreach (var product in lookUp.GetProductNameList())
         yield return lookUp.GetProductFromProductName(product);
 }
Пример #6
0
 public virtual void LookUpAndInitProducts(IProductLookUp lookUp)
 {
     Products =
         lookUp.GetProductNameList()
             .Select(lookUp.GetProductFromProductName).Distinct()
             .Where(p => p != null).OrderBy(p => p);
 }