Skip to content

Commit 0053f45

Browse files
committed
alias Task
1 parent 401c45e commit 0053f45

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

SharedProject/Core/Model/CoverageProject.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.IO;
44
using System.Linq;
55
using System.Threading.Tasks;
6+
using Task = System.Threading.Tasks.Task;
67
using System.Xml.Linq;
78
using System.Xml.XPath;
89
using EnvDTE;
@@ -355,7 +356,7 @@ public XElement ProjectFileXElement
355356
public bool Is64Bit { get; set; }
356357
public string RunSettingsFile { get; set; }
357358

358-
public async System.Threading.Tasks.Task StepAsync(string stepName, Func<ICoverageProject, System.Threading.Tasks.Task> action)
359+
public async Task StepAsync(string stepName, Func<ICoverageProject, Task> action)
359360
{
360361
if (HasFailed)
361362
{
@@ -380,7 +381,7 @@ public async System.Threading.Tasks.Task StepAsync(string stepName, Func<ICovera
380381
}
381382
}
382383

383-
public async System.Threading.Tasks.Task<CoverageProjectFileSynchronizationDetails> PrepareForCoverageAsync()
384+
public async Task<CoverageProjectFileSynchronizationDetails> PrepareForCoverageAsync()
384385
{
385386
EnsureDirectories();
386387
CleanFCCDirectory();
@@ -389,7 +390,7 @@ public async System.Threading.Tasks.Task<CoverageProjectFileSynchronizationDetai
389390
return synchronizationDetails;
390391
}
391392

392-
private async System.Threading.Tasks.Task SetIncludedExcludedReferencedProjectsAsync()
393+
private async Task SetIncludedExcludedReferencedProjectsAsync()
393394
{
394395
List<ReferencedProject> referencedProjects = await GetReferencedProjectsAsync();
395396
SetExcludedReferencedProjects(referencedProjects);

SharedProject/Core/ReportGenerator/ReportGeneratorUtil.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Linq;
66
using System.Text;
77
using System.Threading.Tasks;
8+
using Task = System.Threading.Tasks.Task;
89
using System.Windows;
910
using ExCSS;
1011
using FineCodeCoverage.Core.Utilities;
@@ -25,8 +26,8 @@ interface IReportGeneratorUtil
2526
string ProcessUnifiedHtml(string htmlForProcessing,string reportOutputFolder);
2627
Task<ReportGeneratorResult> GenerateAsync(IEnumerable<string> coverOutputFiles,string reportOutputFolder, bool throwError = false);
2728
string BlankReport(bool withHistory);
28-
System.Threading.Tasks.Task LogCoverageProcessAsync(string message);
29-
System.Threading.Tasks.Task EndOfCoverageRunAsync();
29+
Task LogCoverageProcessAsync(string message);
30+
Task EndOfCoverageRunAsync();
3031
}
3132

3233
internal class ReportGeneratorResult
@@ -1686,14 +1687,14 @@ public string BlankReport(bool withHistory)
16861687
return ProcessUnifiedHtml(resourceProvider.ReadResource("dummyReportToProcess.html"),null);
16871688
}
16881689

1689-
public async System.Threading.Tasks.Task LogCoverageProcessAsync(string message)
1690+
public async Task LogCoverageProcessAsync(string message)
16901691
{
16911692
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
16921693
eventAggregator.SendMessage(new InvokeScriptMessage(CoverageLogJSFunctionName, message));
16931694
logs.Add(message);
16941695
}
16951696

1696-
public async System.Threading.Tasks.Task EndOfCoverageRunAsync()
1697+
public async Task EndOfCoverageRunAsync()
16971698
{
16981699
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
16991700
eventAggregator.SendMessage(new InvokeScriptMessage(ShowFCCWorkingJSFunctionName, false));

SharedProject/Impl/Logger.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
using System.ComponentModel.Composition;
1111
using Microsoft;
1212
using EnvDTE;
13+
using Task = System.Threading.Tasks.Task;
1314

1415
interface IShowFCCOutputPane
1516
{
16-
System.Threading.Tasks.Task ShowAsync();
17+
Task ShowAsync();
1718
}
1819
[Export(typeof(IShowFCCOutputPane))]
1920
[Export(typeof(ILogger))]
@@ -154,7 +155,7 @@ public void LogWithoutTitle(IEnumerable<string> message)
154155
LogImpl(message.ToArray(), false);
155156
}
156157

157-
public async System.Threading.Tasks.Task ShowAsync()
158+
public async Task ShowAsync()
158159
{
159160
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
160161

SharedProject/Output/OutputToolWindowPackage.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Runtime.InteropServices;
66
using System.Diagnostics.CodeAnalysis;
77
using System.ComponentModel.Composition;
8+
using System.Threading.Tasks;
89
using Task = System.Threading.Tasks.Task;
910
using Microsoft.VisualStudio.Shell.Interop;
1011
using EnvDTE80;
@@ -91,9 +92,9 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke
9192
await ClearUICommand.InitializeAsync(this, componentModel.GetService<IFCCEngine>());
9293
}
9394

94-
protected override System.Threading.Tasks.Task<object> InitializeToolWindowAsync(Type toolWindowType, int id, CancellationToken cancellationToken)
95+
protected override Task<object> InitializeToolWindowAsync(Type toolWindowType, int id, CancellationToken cancellationToken)
9596
{
96-
return System.Threading.Tasks.Task.FromResult<object>(GetOutputToolWindowContext());
97+
return Task.FromResult<object>(GetOutputToolWindowContext());
9798
}
9899
public override IVsAsyncToolWindowFactory GetAsyncToolWindowFactory(Guid toolWindowType)
99100
{

0 commit comments

Comments
 (0)