GetVisualStudioSolutionFiles() приватный Метод

private GetVisualStudioSolutionFiles ( string searchPattern = null ) : IEnumerable
searchPattern string
Результат IEnumerable
        public void OnClick(Window mainWindow, Instance instance)
        {
            if (instance == null)
              {
            return;
              }

              var paths = instance.GetVisualStudioSolutionFiles().ToArray();

              if (paths.Length > 0)
              {
            CoreApp.OpenFile(paths.First());
            return;
              }

              const string noThanks = "No, thanks";
              const string yesAspNetMvc = "Yes, ASP.NET MVC";

              var options = new[] { noThanks, yesAspNetMvc };
              var result = WindowHelper.AskForSelection("Choose Visual Studio Project Type", null, "There isn't any Visual Studio project in the instance's folder. \n\nWould you like us to create a new one?", options, mainWindow);
              if (result == null || result == noThanks)
              {
            return;
              }

              var packageName = "Visual Studio 2015 Website Project.zip";
              var product = GetProduct(packageName);
              if (product == null)
              {
            WindowHelper.HandleError("The " + packageName + " package cannot be found in either the .\\Packages folder", false);
            return;
              }

              PipelineManager.StartPipeline("installmodules", new InstallModulesArgs(instance, new[] { product }), isAsync: false);
              var path = instance.GetVisualStudioSolutionFiles().FirstOrDefault();
              Assert.IsTrue(!string.IsNullOrEmpty(path) && FileSystem.FileSystem.Local.File.Exists(path), "The Visual Studio files are missing");

              CoreApp.OpenFile(path);
        }
    public void OnClick(Window mainWindow, Instance instance)
    {
      if (instance != null)
      {
        var paths = instance.GetVisualStudioSolutionFiles().ToArray();
        if (paths.Length == 1)
        {
          WindowHelper.OpenFile(paths.First());
        }
        else if (paths.Length == 0)
        {
          var version = instance.Product.Version.SubstringEx(0, 3);
          const string noThanks = "No, thanks";
          const string yesAspNetWebforms = "Yes, ASP.NET WebForms";
          const string yesAspNetMvc = "Yes, ASP.NET MVC";

          var packageName = "Visual Studio " + AppSettings.AppToolsVisualStudioVersion.Value + " Website Project.zip";

          var is66 = version == "6.6";
          var is70 = version == "7.0";
          var is7x = version[0] == '7';
          var is71plus = is7x && !is70;
          var is8 = version[0] == '8';
          if (is66 || is7x || is8)
          {
            var options = is71plus ? new[]
            {
              noThanks, yesAspNetMvc
            } : new[]
            {
              noThanks, yesAspNetWebforms, yesAspNetMvc
            };
            var result = WindowHelper.AskForSelection("Choose Visual Studio Project Type", null, 
              "There isn't any Visual Studio project in the instance's folder. \n\nWould you like us to create a new one?", 
              options, mainWindow);
            if (result == null || result == noThanks)
            {
              return;
            }

            if (result == yesAspNetMvc)
            {
              if (!this.EnsureMvcEnabled(mainWindow, instance, version))
              {
                return;
              }

              packageName = "Visual Studio " + AppSettings.AppToolsVisualStudioVersion.Value + " MVC" + (is71plus ? " 4" : string.Empty) + " Website Project.zip";
            }
          }

          Product product = GetProduct(packageName);

          if (product == null)
          {
            WindowHelper.HandleError("The " + packageName + " package cannot be found in either the .\\Packages folder", false, null);
            return;
          }

          PipelineManager.StartPipeline("installmodules", new InstallModulesArgs(instance, new[]
          {
            product
          }), isAsync: false);
          var path = instance.GetVisualStudioSolutionFiles().FirstOrDefault();
          Assert.IsTrue(!string.IsNullOrEmpty(path) && FileSystem.FileSystem.Local.File.Exists(path), "The Visual Studio files are missing");
          WindowHelper.OpenFile(path);
        }
        else
        {
          var rootPath = instance.RootPath.ToLowerInvariant();
          var virtualPaths = paths.Select(file => file.ToLowerInvariant().Replace(rootPath, string.Empty).TrimStart('\\'));
          var path = WindowHelper.AskForSelection("Open Visual Studio", null, "Select the project you need", virtualPaths, mainWindow, paths.First());
          if (string.IsNullOrEmpty(path))
          {
            return;
          }

          WindowHelper.OpenFile(Path.Combine(rootPath, path));
        }
      }
    }