39 references to Default
Microsoft.CodeAnalysis.Workspaces (39)
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (2)
52_set = SharedPools.Default<SegmentedHashSet<ClassifiedSpan>>().AllocateAndClear(); 82SharedPools.Default<SegmentedHashSet<ClassifiedSpan>>().Free(_set);
FindSymbols\FindReferences\FindReferenceCache.cs (1)
156using var obj = SharedPools.Default<Stack<SyntaxNodeOrToken>>().GetPooledObject();
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (2)
254private static readonly ObjectPool<List<string>> s_stringListPool = SharedPools.Default<List<string>>(); 790private static readonly ObjectPool<MetadataNode> s_pool = SharedPools.Default<MetadataNode>();
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (2)
26public static readonly ObjectPool<HashSet<string>> StringLiteralHashSetPool = SharedPools.Default<HashSet<string>>(); 27public static readonly ObjectPool<HashSet<long>> LongLiteralHashSetPool = SharedPools.Default<HashSet<long>>();
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (1)
37= SharedPools.Default<List<Dictionary<string, string>>>();
Log\KeyValueLogMessage.cs (2)
148SharedPools.Default<Dictionary<string, object?>>().ClearAndFree(_lazyMap); 164_lazyMap = SharedPools.Default<Dictionary<string, object?>>().AllocateAndClear();
Shared\Extensions\INamespaceSymbolExtensions.cs (1)
131using var namespaceQueue = SharedPools.Default<Queue<INamespaceOrTypeSymbol>>().GetPooledObject();
Shared\Utilities\XmlFragmentParser.cs (1)
25private static readonly ObjectPool<XmlFragmentParser> s_pool = SharedPools.Default<XmlFragmentParser>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeOrTokenExtensions.cs (1)
28using var pooledStack = SharedPools.Default<Stack<SyntaxNodeOrToken>>().GetPooledObject();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\ContextMutableIntervalTree.cs (1)
86using var pooledObject = SharedPools.Default<Stack<Node>>().GetPooledObject();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (1)
95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\StringBuilderPool.cs (3)
12=> SharedPools.Default<StringBuilder>().AllocateAndClear(); 15=> SharedPools.Default<StringBuilder>().ClearAndFree(builder); 19SharedPools.Default<StringBuilder>().ForgetTrackedObject(builder);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (6)
61private static readonly ObjectPool<StaticLogMessage> s_pool = SharedPools.Default<StaticLogMessage>(); 89private static readonly ObjectPool<LazyLogMessage> s_pool = SharedPools.Default<LazyLogMessage>(); 119private static readonly ObjectPool<LazyLogMessage<TArg0>> s_pool = SharedPools.Default<LazyLogMessage<TArg0>>(); 152private static readonly ObjectPool<LazyLogMessage<TArg0, TArg1>> s_pool = SharedPools.Default<LazyLogMessage<TArg0, TArg1>>(); 188private static readonly ObjectPool<LazyLogMessage<TArg0, TArg1, TArg2>> s_pool = SharedPools.Default<LazyLogMessage<TArg0, TArg1, TArg2>>(); 227private static readonly ObjectPool<LazyLogMessage<TArg0, TArg1, TArg2, TArg3>> s_pool = SharedPools.Default<LazyLogMessage<TArg0, TArg1, TArg2, TArg3>>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
21= SharedPools.Default<Stack<(SyntaxNodeOrToken nodeOrToken, bool leading, bool trailing)>>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
322private static readonly ObjectPool<SymbolKeyReader> s_readerPool = SharedPools.Default<SymbolKeyReader>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
55private static readonly ObjectPool<SymbolKeyWriter> s_writerPool = SharedPools.Default<SymbolKeyWriter>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject();
Workspace\Solution\ProjectDependencyGraph.cs (9)
269using var pooledObject = SharedPools.Default<HashSet<ProjectId>>().GetPooledObject(); 321using var pooledObject = SharedPools.Default<HashSet<ProjectId>>().GetPooledObject(); 366using var seenProjects = SharedPools.Default<HashSet<ProjectId>>().GetPooledObject(); 367using var resultList = SharedPools.Default<List<ProjectId>>().GetPooledObject(); 418using var seenProjects = SharedPools.Default<HashSet<ProjectId>>().GetPooledObject(); 419using var results = SharedPools.Default<List<IEnumerable<ProjectId>>>().GetPooledObject(); 435using var dependencySet = SharedPools.Default<HashSet<ProjectId>>().GetPooledObject(); 442using var topologicallySeenProjects = SharedPools.Default<HashSet<ProjectId>>().GetPooledObject(); 443using var sortedProjects = SharedPools.Default<List<ProjectId>>().GetPooledObject();
Workspace\Solution\SolutionState_Checksum.cs (1)
106using var projectCone = SharedPools.Default<HashSet<ProjectId>>().GetPooledObject();
Workspace\Solution\TextDocumentStates.cs (1)
142using var pooledIds = SharedPools.Default<List<DocumentId>>().GetPooledObject();