diff --git a/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Metadata.cs b/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Metadata.cs index 8bbc204f0c571..72df9c0e86374 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Metadata.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo_Metadata.cs @@ -176,7 +176,7 @@ private static Task CreateMetadataSymbolTreeInfoAsync( services, solutionKey, getChecksumAsync: () => new ValueTask(GetMetadataChecksum(services, reference, cancellationToken)), - createAsync: checksum => new ValueTask(CreateMetadataSymbolTreeInfo(checksum, reference)), + createAsync: checksum => new ValueTask(new MetadataInfoCreator(checksum, reference).Create()), keySuffix: GetMetadataKeySuffix(reference), cancellationToken); } @@ -200,13 +200,6 @@ public static Task LoadAnyInfoForMetadataReferenceAsync( cancellationToken); } - private static SymbolTreeInfo CreateMetadataSymbolTreeInfo( - Checksum checksum, PortableExecutableReference reference) - { - var creator = new MetadataInfoCreator(checksum, reference); - return creator.Create(); - } - private struct MetadataInfoCreator : IDisposable { private static readonly Predicate s_isNotNullOrEmpty = s => !string.IsNullOrEmpty(s); @@ -760,7 +753,7 @@ private void AddUnsortedNodes(ArrayBuilder unsortedNodes, } } - private class MetadataNode + private sealed class MetadataNode { private static readonly ObjectPool s_pool = SharedPools.Default();