Skip to content

Commit 35f3965

Browse files
committed
Convert method to local function
1 parent 709f5e2 commit 35f3965

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/LanguageServices/LanguageServiceHost.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -298,22 +298,22 @@ private async Task<Workspace> GetPrimaryWorkspaceAsync(CancellationToken cancell
298298
{
299299
await ValidateEnabledAsync(cancellationToken);
300300

301-
await WhenProjectLoaded(cancellationToken);
301+
await WhenProjectLoaded();
302302
}
303303

304304
return _primaryWorkspace ?? throw Assumes.Fail("Primary workspace unknown.");
305-
}
306305

307-
private async Task WhenProjectLoaded(CancellationToken cancellationToken)
308-
{
309-
// The active configuration can change multiple times during initialization in cases where we've incorrectly
310-
// guessed the configuration via our IProjectConfigurationDimensionsProvider3 implementation.
311-
// Wait until that has been determined before we publish the wrong configuration.
312-
await _tasksService.PrioritizedProjectLoadedInHost.WithCancellation(cancellationToken);
313-
314-
// We block project load on initialization of the primary workspace.
315-
// Therefore by this point we must have set the primary workspace.
316-
System.Diagnostics.Debug.Assert(_firstPrimaryWorkspaceSet.Task is { IsCompleted: true, IsFaulted: false });
306+
async Task WhenProjectLoaded()
307+
{
308+
// The active configuration can change multiple times during initialization in cases where we've incorrectly
309+
// guessed the configuration via our IProjectConfigurationDimensionsProvider3 implementation.
310+
// Wait until that has been determined before we publish the wrong configuration.
311+
await _tasksService.PrioritizedProjectLoadedInHost.WithCancellation(cancellationToken);
312+
313+
// We block project load on initialization of the primary workspace.
314+
// Therefore by this point we must have set the primary workspace.
315+
System.Diagnostics.Debug.Assert(_firstPrimaryWorkspaceSet.Task is { IsCompleted: true, IsFaulted: false });
316+
}
317317
}
318318

319319
#endregion

0 commit comments

Comments
 (0)