RIM.VSNDK_Package.VSNDK_PackagePackage.GetInstalledSimulatorList C# (CSharp) Method

GetInstalledSimulatorList() public method

Retrieve a list of the installed runtimes on the PC.
public GetInstalledSimulatorList ( ) : bool
return bool
        public bool GetInstalledSimulatorList()
        {
            bool success = false;

            installedSimulatorList = new List<string>();

            string[] directories = Directory.GetFiles(bbndkPathConst, "*.vmxf", SearchOption.AllDirectories);

            foreach (string directory in directories)
            {
                if (directory.Contains("simulator_"))
                {
                    installedSimulatorList.Add(directory.Substring(0, directory.LastIndexOf("\\")).Substring(directory.IndexOf("simulator_") + 10).Replace('_', '.'));
                    success = true;
                }
                else
                {
                    continue;
                }
            }

            return success;
        }