/// <summary> /// The method to call for the execution of the command. /// </summary> private void OnExecute() { //Get the current directory if the directory hasn't been set. if (string.IsNullOrEmpty(Path)) { Path = System.IO.Directory.GetCurrentDirectory(); } try { var pathsToSoultionAndProjectFiles = _directoryService.FindAllFilesOfExtensionsInDirectory(Path); foreach (var pathToSoultionAndProjectFile in pathsToSoultionAndProjectFiles) { System.Console.WriteLine(pathToSoultionAndProjectFile); } } catch (Exception exception) { System.Console.WriteLine(exception.Message); } }