public UpdateCurrentIds ( IEnumerable |
||
potentialReferences | IEnumerable |
|
return | void |
private void UpdateReferences(ICodeDocument document, DocumentReferencedIdManager idManager) { // Note: if this proves to be too slow with large documents, we can potentially optimize the finding // of references by only considering the parts of the AST which occur after the Offset at which the text change began // (we can find this by getting hold of the TextSnapshotChangedEventArgs) var potentialReferences = FindPotentialReferences(document).ToList(); var newReferences = potentialReferences.Where(idManager.NeedsChecking).ToArray(); if (newReferences.Any()) { DocumentIdCheckHelpers.GetActualIds(newReferences) .ContinueOnSuccessInTheUIThread(ids => { idManager.AddKnownIds(ids); idManager.AddKnownInvalidIds(newReferences.Except(ids, StringComparer.OrdinalIgnoreCase)); idManager.UpdateCurrentIds(potentialReferences); }); } }
private void UpdateReferences(ICodeDocument document, DocumentReferencedIdManager idManager) { // Note: if this proves to be too slow with large documents, we can potentially optimize the finding // of references by only considering the parts of the AST which occur after the Offset at which the text change began // (we can find this by getting hold of the TextSnapshotChangedEventArgs) var potentialReferences = FindPotentialReferences(document).ToList(); var newReferences = potentialReferences.Where(idManager.NeedsChecking).ToArray(); if (newReferences.Any()) { DocumentIdCheckHelpers.GetActualIds(newReferences) .ContinueOnSuccessInTheUIThread(ids => { idManager.AddKnownIds(ids); idManager.AddKnownInvalidIds(newReferences.Except(ids, StringComparer.OrdinalIgnoreCase)); idManager.UpdateCurrentIds(potentialReferences); }); } }