Skip to content

Commit 9b99b42

Browse files
authored
Merge pull request #8617 from drewnoakes/lang-svc-small-bits
Add dataflow block name and some API docs
2 parents 279a7f1 + 893e60c commit 9b99b42

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ protected override async Task InitializeCoreAsync(CancellationToken cancellation
132132
target: DataflowBlockFactory.CreateActionBlock<IProjectVersionedValue<(ConfiguredProject ActiveConfiguredProject, ConfigurationSubscriptionSources Sources)>>(
133133
update => OnSlicesChanged(update, cancellationToken),
134134
_unconfiguredProject,
135-
ProjectFaultSeverity.LimitedFunctionality),
135+
ProjectFaultSeverity.LimitedFunctionality,
136+
"LanguageServiceHostSlices {0}"),
136137
linkOptions: DataflowOption.PropagateCompletion,
137138
cancellationToken: cancellationToken),
138139

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,34 @@ protected override Task DisposeCoreUnderLockAsync(bool initialized)
134134
return Task.CompletedTask;
135135
}
136136

137+
/// <summary>
138+
/// Adds an object that will be disposed along with this <see cref="Workspace"/> instance.
139+
/// </summary>
140+
/// <param name="disposable">The object to dispose when this object is disposed.</param>
137141
public void ChainDisposal(IDisposable disposable)
138142
{
139143
Verify.NotDisposed(this);
140144

141145
_disposableBag.Add(disposable);
142146
}
143147

148+
/// <summary>
149+
/// Integrates project updates into the workspace.
150+
/// </summary>
151+
/// <remarks>
152+
/// <para>
153+
/// This method must always receive an evaluation update first. After that point,
154+
/// both evaluation and build updates may arrive in any order, so long as values
155+
/// of each type are ordered correctly.
156+
/// </para>
157+
/// <para>
158+
/// Calls must not overlap. This method is not thread-safe. This method is designed
159+
/// to be called from a dataflow ActionBlock, which will serialize calls, so we
160+
/// needn't perform any locking or protection here.
161+
/// </para>
162+
/// </remarks>
163+
/// <param name="update">The project update to integrate.</param>
164+
/// <returns>A task that completes when the update has been integrated.</returns>
144165
internal async Task OnWorkspaceUpdateAsync(IProjectVersionedValue<WorkspaceUpdate> update)
145166
{
146167
Verify.NotDisposed(this);

0 commit comments

Comments
 (0)