コード例 #1
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));
            }
        }
コード例 #2
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);
        }
コード例 #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);
 }