Skip to content

Commit c81a4e8

Browse files
Rename field to make it clearer what it's used for
It's only for dynamic files, so make that clear.
1 parent b3804f1 commit c81a4e8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Workspaces/Core/Portable/Workspace/ProjectSystem/ProjectSystemProject.BatchingDocumentCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void AddDynamicFile_NoLock(IDynamicFileInfoProvider fileInfoProvider, Dyn
213213

214214
_documentIdToDynamicFileInfoProvider.Add(documentId, fileInfoProvider);
215215

216-
if (_project._eventSubscriptionTracker.Add(fileInfoProvider))
216+
if (_project._dynamicFileInfoProvidersSubscribedTo.Add(fileInfoProvider))
217217
{
218218
// subscribe to the event when we use this provider the first time
219219
fileInfoProvider.Updated += _project.OnDynamicFileInfoUpdated;

src/Workspaces/Core/Portable/Workspace/ProjectSystem/ProjectSystemProject.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ internal sealed partial class ProjectSystemProject
124124
private readonly IFileChangeContext _documentFileChangeContext;
125125

126126
/// <summary>
127-
/// track whether we have been subscribed to <see cref="IDynamicFileInfoProvider.Updated"/> event
127+
/// The set of dynamic file info providers we have already subscribed to.
128128
/// </summary>
129-
private readonly HashSet<IDynamicFileInfoProvider> _eventSubscriptionTracker = [];
129+
private readonly HashSet<IDynamicFileInfoProvider> _dynamicFileInfoProvidersSubscribedTo = [];
130130

131131
/// <summary>
132132
/// Map of the original dynamic file path to the <see cref="DynamicFileInfo.FilePath"/> that was associated with it.
@@ -1417,12 +1417,12 @@ public void RemoveFromWorkspace()
14171417
_asynchronousFileChangeProcessingCancellationTokenSource.Cancel();
14181418

14191419
// clear tracking to external components
1420-
foreach (var provider in _eventSubscriptionTracker)
1420+
foreach (var provider in _dynamicFileInfoProvidersSubscribedTo)
14211421
{
14221422
provider.Updated -= OnDynamicFileInfoUpdated;
14231423
}
14241424

1425-
_eventSubscriptionTracker.Clear();
1425+
_dynamicFileInfoProvidersSubscribedTo.Clear();
14261426
}
14271427

14281428
_documentFileChangeContext.Dispose();

0 commit comments

Comments
 (0)