@@ -197,7 +197,7 @@ private void CleanUpComponentAttributes(ICollection<IVBComponent> components)
197
197
}
198
198
}
199
199
200
- private void ExecuteCommonParseActivities ( List < IVBComponent > toParse , CancellationToken token )
200
+ private void ExecuteCommonParseActivities ( ICollection < IVBComponent > toParse , CancellationToken token )
201
201
{
202
202
token . ThrowIfCancellationRequested ( ) ;
203
203
@@ -256,7 +256,7 @@ private void RefreshDeclarationFinder()
256
256
State . RefreshFinder ( _hostApp ) ;
257
257
}
258
258
259
- private void SetModuleStates ( List < IVBComponent > components , ParserState parserState , CancellationToken token )
259
+ private void SetModuleStates ( ICollection < IVBComponent > components , ParserState parserState , CancellationToken token )
260
260
{
261
261
var options = new ParallelOptions ( ) ;
262
262
options . CancellationToken = token ;
@@ -315,7 +315,7 @@ private void RemoveReferences(IEnumerable<Declaration> declarations, ICollection
315
315
}
316
316
}
317
317
318
- private void ParseComponents ( List < IVBComponent > components , CancellationToken token )
318
+ private void ParseComponents ( ICollection < IVBComponent > components , CancellationToken token )
319
319
{
320
320
token . ThrowIfCancellationRequested ( ) ;
321
321
@@ -410,7 +410,7 @@ private void ProcessComponentParseResults(IVBComponent component, Task<Component
410
410
}
411
411
412
412
413
- private void ResolveAllDeclarations ( List < IVBComponent > components , CancellationToken token )
413
+ private void ResolveAllDeclarations ( ICollection < IVBComponent > components , CancellationToken token )
414
414
{
415
415
token . ThrowIfCancellationRequested ( ) ;
416
416
@@ -719,7 +719,11 @@ private void ParseAllInternal(object requestor, CancellationToken token)
719
719
720
720
token . ThrowIfCancellationRequested ( ) ;
721
721
722
- var toParse = components . Where ( component => State . IsNewOrModified ( component ) ) . ToList ( ) ;
722
+ var toParse = components . Where ( component => State . IsNewOrModified ( component ) ) . ToHashSet ( ) ;
723
+
724
+ token . ThrowIfCancellationRequested ( ) ;
725
+
726
+ toParse . UnionWith ( components . Where ( component => State . GetModuleState ( component ) != ParserState . Ready ) ) ;
723
727
724
728
token . ThrowIfCancellationRequested ( ) ;
725
729
0 commit comments