GetSelectFileName() private method

private GetSelectFileName ( ) : Task
return Task
コード例 #1
0
        private string GetTargetPath(GitToolCommand command)
        {
            var workingDirectory = sccService.CurrentGitWorkingDirectory;

            if (command.Scope == CommandScope.Project)
            {
                return(workingDirectory);
            }
            var fileName = sccService.GetSelectFileName();

            if (fileName == sccService.GetSolutionFileName())
            {
                return(workingDirectory);
            }
            return(fileName);
        }
コード例 #2
0
        private string GetTargetPath(GitToolCommand command)
        {
            var workingDirectory = sccService.CurrentWorkingDirectory;

            if (command.Scope == CommandScope.Project)
            {
                return(workingDirectory);
            }
            var path = ThreadHelper.JoinableTaskFactory.Run(async delegate
            {
                var fileName     = await sccService.GetSelectFileName();
                var solutionName = await sccService.GetSolutionFileName();
                if (string.Equals(fileName, solutionName, StringComparison.OrdinalIgnoreCase))
                {
                    return(workingDirectory);
                }
                return(fileName);
            });

            return(path);
        }