Skip to content

Commit 30cdee9

Browse files
author
Samir L. Boulema
committed
#71, #72
1 parent 0d875b7 commit 30cdee9

17 files changed

Lines changed: 29 additions & 36 deletions

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ dotnet_diagnostic.IDE0022.severity = none
1111

1212
# IDE0008: Use explicit type
1313
dotnet_diagnostic.IDE0008.severity = none
14+
15+
# VSTHRD111: Use ConfigureAwait(bool)
16+
dotnet_diagnostic.VSTHRD111.severity = none

TSVN.Shared/Commands/AddFileCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class AddFileCommand : BaseCommand<AddFileCommand>
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
1415
await KnownCommands.File_SaveSelectedItems.ExecuteAsync();
1516
await CommandHelper.RunTortoiseSvnFileCommand("add");
1617
}

TSVN.Shared/Commands/CommitCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ internal sealed class CommitCommand : BaseCommand<CommitCommand>
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14-
await KnownCommands.File_SaveAll.ExecuteAsync().ConfigureAwait(false);
15-
await CommandHelper.RunTortoiseSvnCommand("commit").ConfigureAwait(false);
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
15+
await KnownCommands.File_SaveAll.ExecuteAsync();
16+
await CommandHelper.RunTortoiseSvnCommand("commit");
1617
}
1718
}
1819
}

TSVN.Shared/Commands/CommitFileCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class CommitFileCommand : BaseCommand<CommitFileCommand>
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
1415
await KnownCommands.File_SaveSelectedItems.ExecuteAsync();
1516
await CommandHelper.RunTortoiseSvnFileCommand("commit");
1617
}

TSVN.Shared/Commands/RenameFileCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class RenameFileCommand : BaseCommand<RenameFileCommand>
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
1415
await KnownCommands.File_SaveAll.ExecuteAsync();
1516
await CommandHelper.RunTortoiseSvnFileCommand("rename");
1617
}

TSVN.Shared/Commands/UpdateCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class UpdateCommand : BaseCommand<UpdateCommand>
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
1415
await KnownCommands.File_SaveAll.ExecuteAsync();
1516
await CommandHelper.RunTortoiseSvnCommand("update");
1617
}

TSVN.Shared/Commands/UpdateFileCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class UpdateFileCommand : BaseCommand<UpdateFileCommand>
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
1415
await KnownCommands.File_SaveSelectedItems.ExecuteAsync();
1516
await CommandHelper.RunTortoiseSvnFileCommand("update");
1617
}

TSVN.Shared/Commands/UpdateToRevisionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class UpdateToRevisionCommand : BaseCommand<UpdateToRevisionComm
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
1415
await KnownCommands.File_SaveAll.ExecuteAsync();
1516
await CommandHelper.RunTortoiseSvnCommand("update", "/rev");
1617
}

TSVN.Shared/Commands/UpdateToRevisionFileCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ internal sealed class UpdateToRevisionFileCommand : BaseCommand<UpdateToRevision
1111
{
1212
protected override async Task ExecuteAsync(OleMenuCmdEventArgs e)
1313
{
14+
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
1415
await KnownCommands.File_SaveSelectedItems.ExecuteAsync();
1516
await CommandHelper.RunTortoiseSvnFileCommand("update", "/rev");
1617
}

TSVN.Shared/Helpers/FileHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static async Task OpenFile(string filePath)
3333
return;
3434
}
3535

36-
await VS.Commands.ExecuteAsync("File.OpenFile", filePath).ConfigureAwait(false);
36+
await VS.Commands.ExecuteAsync("File.OpenFile", filePath);
3737
}
3838

3939
/// <summary>
@@ -60,7 +60,7 @@ public static async Task<string> GetPath()
6060
}
6161

6262
// Context menu in the Code Editor
63-
var documentView = await VS.Documents.GetActiveDocumentViewAsync().ConfigureAwait(false);
63+
var documentView = await VS.Documents.GetActiveDocumentViewAsync();
6464
return documentView?.Document?.FilePath;
6565
}
6666

0 commit comments

Comments
 (0)