예제 #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);
 }