FindDynamoInstallations() public static method

public static FindDynamoInstallations ( string debugPath = null, IProductLookUp lookUp = null ) : DynamoProducts
debugPath string
lookUp IProductLookUp
return DynamoProducts
Esempio n. 1
0
        /// <summary>
        /// Finds all unique Dynamo installation on the system that has file
        /// identifiable by the given fileLocator.
        /// </summary>
        /// <param name="additionalDynamoPath">Additional path for Dynamo binaries
        /// to be included in search</param>
        /// <param name="fileLocator">A callback method to locate dynamo specific files.</param>
        /// <returns>List of KeyValuePair of install location and version info
        /// as Tuple. The returned list is sorted based on version info.</returns>
        public static IEnumerable LocateDynamoInstallations(string additionalDynamoPath, Func <string, string> fileLocator)
        {
            var installs = DynamoProducts.FindDynamoInstallations(additionalDynamoPath, new InstalledProductLookUp("Dynamo", fileLocator));

            return
                (installs.Products.Select(
                     p =>
                     new KeyValuePair <string, Tuple <int, int, int, int> >(
                         p.InstallLocation,
                         p.VersionInfo)));
        }
Esempio n. 2
0
        /// <summary>
        /// Finds all unique Dynamo installations on the system
        /// </summary>
        /// <param name="additionalDynamoPath">Additional path for Dynamo binaries
        /// to be included in search</param>
        /// <returns>List of KeyValuePair of install location and version info
        /// as Tuple. The returned list is sorted based on version info.</returns>
        public static IEnumerable FindDynamoInstallations(string additionalDynamoPath)
        {
            var installs = DynamoProducts.FindDynamoInstallations(additionalDynamoPath);

            return
                (installs.Products.Select(
                     p =>
                     new KeyValuePair <string, Tuple <int, int, int, int> >(
                         p.InstallLocation,
                         p.VersionInfo)));
        }