mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-26 03:40:45 +08:00
- Remove all synchronous method in commands - `Command.ReadToEndAsync` now is protected method - Rename `ResultAsync` to `GetResultAsync` - Call `ConfigureAwait(false)` when there's no context Signed-off-by: leo <longshuang@msn.cn>
19 lines
424 B
C#
19 lines
424 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace SourceGit.Commands
|
|
{
|
|
public class QueryRepositoryRootPath : Command
|
|
{
|
|
public QueryRepositoryRootPath(string path)
|
|
{
|
|
WorkingDirectory = path;
|
|
Args = "rev-parse --show-toplevel";
|
|
}
|
|
|
|
public async Task<Result> GetResultAsync()
|
|
{
|
|
return await ReadToEndAsync().ConfigureAwait(false);
|
|
}
|
|
}
|
|
}
|