14 references to new
Microsoft.CodeAnalysis.CodeStyle (14)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (4)
43
private static readonly ObjectPool<ConcurrentStack<AnalysisResult>> s_analysisResultPool =
new
(() => new());
44
private static readonly ObjectPool<ConcurrentSet<SyntaxNode>> s_nodeSetPool =
new
(() => []);
46
private static readonly ObjectPool<ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>>> s_fieldToUsageLocationPool =
new
(() => []);
60
_fieldNamesPool =
new
(() => new(this.SyntaxFacts.StringComparer));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
852
private static readonly ObjectPool<Stack<TDirectiveTriviaSyntax>> s_stackPool =
new
(() => new());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
24
new
(() => new BasicBlockAnalysisData());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
32
private static readonly ObjectPool<Walker> s_visitorPool =
new
(() => new Walker());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (1)
36
private static readonly ObjectPool<SegmentedList<TokenPairWithOperations>> s_tokenPairListPool =
new
(() => [], trimOnFree: false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\NodeOperations.cs (4)
17
private static readonly ObjectPool<SegmentedList<IndentBlockOperation>> s_indentBlockOperationPool =
new
(() => []);
18
private static readonly ObjectPool<SegmentedList<SuppressOperation>> s_suppressOperationPool =
new
(() => []);
19
private static readonly ObjectPool<SegmentedList<AlignTokensOperation>> s_alignTokensOperationPool =
new
(() => []);
20
private static readonly ObjectPool<SegmentedList<AnchorIndentationOperation>> s_anchorIndentationOperationPool =
new
(() => []);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.ReaderReferenceMap.cs (1)
21
=
new
(() => new SegmentedList<string>(20));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.WriterReferenceMap.cs (1)
22
private static readonly ObjectPool<SegmentedDictionary<string, int>> s_valueDictionaryPool =
new
(() => new(128));