提交 942c751c 编写于 作者: C CyrusNajmabadi

Reorder parameters.

上级 b19cb193
......@@ -495,7 +495,7 @@ internal static class DependentTypeFinder
// Search all the documents of this project in parallel.
var tasks = project.Documents.Select(d => FindImmediatelyInheritingTypesInDocumentAsync(
typesToSearchFor, inheritanceInfo, d,
d, typesToSearchFor, inheritanceInfo,
cachedModels, cachedInfos,
sourceTypeImmediatelyMatches, cancellationToken)).ToArray();
......@@ -548,9 +548,9 @@ internal static class DependentTypeFinder
}
private static async Task<IEnumerable<INamedTypeSymbol>> FindImmediatelyInheritingTypesInDocumentAsync(
Document document,
HashSet<INamedTypeSymbol> typesToSearchFor,
InheritanceInfo inheritanceInfo,
Document document,
ConcurrentSet<SemanticModel> cachedModels,
ConcurrentSet<IDeclarationInfo> cachedInfos,
Func<HashSet<INamedTypeSymbol>, INamedTypeSymbol, bool> typeImmediatelyMatches,
......@@ -563,22 +563,24 @@ internal static class DependentTypeFinder
foreach (var symbolInfo in declarationInfo.DeclaredSymbolInfos)
{
result = await ProcessSymbolInfo(
document, symbolInfo,
typesToSearchFor,
inheritanceInfo, document, cachedModels,
typeImmediatelyMatches, result, symbolInfo, cancellationToken).ConfigureAwait(false);
inheritanceInfo, cachedModels,
typeImmediatelyMatches, result, cancellationToken).ConfigureAwait(false);
}
return result;
}
private static async Task<HashSet<INamedTypeSymbol>> ProcessSymbolInfo(
Document document,
DeclaredSymbolInfo info,
HashSet<INamedTypeSymbol> typesToSearchFor,
InheritanceInfo inheritanceInfo,
Document document,
ConcurrentSet<SemanticModel> cachedModels,
Func<HashSet<INamedTypeSymbol>, INamedTypeSymbol, bool> typeImmediatelyMatches,
HashSet<INamedTypeSymbol> result,
DeclaredSymbolInfo info, CancellationToken cancellationToken)
CancellationToken cancellationToken)
{
// If we're searching for enums/structs/delegates, then we can just look at the kind of
// the info to see if we have a match.
......@@ -639,10 +641,10 @@ internal static class DependentTypeFinder
}
private static async Task<ISymbol> ResolveAsync(
Document doc, DeclaredSymbolInfo info, ConcurrentSet<SemanticModel> cachedModels,
Document document, DeclaredSymbolInfo info, ConcurrentSet<SemanticModel> cachedModels,
CancellationToken cancellationToken)
{
var semanticModel = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
cachedModels.Add(semanticModel);
return info.Resolve(semanticModel, cancellationToken);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册