code_review: PR #1492

- 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>
This commit is contained in:
leo
2025-07-03 10:15:14 +08:00
parent 463e304491
commit 40765826ce
166 changed files with 1625 additions and 2163 deletions

View File

@@ -1,4 +1,6 @@
namespace SourceGit.Commands
using System.Threading.Tasks;
namespace SourceGit.Commands
{
public class QueryRepositoryRootPath : Command
{
@@ -7,5 +9,10 @@
WorkingDirectory = path;
Args = "rev-parse --show-toplevel";
}
public async Task<Result> GetResultAsync()
{
return await ReadToEndAsync().ConfigureAwait(false);
}
}
}