FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (8)
151using var _ = ArrayBuilder<ISymbol>.GetInstance(out var workQueue);
171using var _ = ArrayBuilder<ISymbol>.GetInstance(out var workQueue);
186FindReferencesSearchEngine engine, ImmutableArray<ISymbol> symbols, MetadataUnifyingSymbolHashSet seenSymbols, ArrayBuilder<ISymbol> workQueue, CancellationToken cancellationToken)
193FindReferencesSearchEngine engine, ISymbol symbol, MetadataUnifyingSymbolHashSet seenSymbols, ArrayBuilder<ISymbol> workQueue, CancellationToken cancellationToken)
239MetadataUnifyingSymbolHashSet seenSymbols, ArrayBuilder<ISymbol> workQueue,
274ArrayBuilder<ISymbol> workQueue,
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (10)
72SyntaxNode container, TMemberDeclarationSyntax memberDeclaration, StringTable stringTable, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, string containerDisplayName, string fullyQualifiedContainerName);
74TMemberDeclarationSyntax memberDeclaration, StringTable stringTable, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, string containerDisplayName, string fullyQualifiedContainerName, CancellationToken cancellationToken);
76SyntaxNode container, TMemberDeclarationSyntax memberDeclaration, StringTable stringTable, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, string containerDisplayName, string fullyQualifiedContainerName, CancellationToken cancellationToken);
144protected static void Intern(StringTable stringTable, ArrayBuilder<string> builder)
155ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos,
156Dictionary<string, ArrayBuilder<int>> extensionMethodInfo,
179ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos,
181Dictionary<string, ArrayBuilder<int>> extensionMethodInfo,
351if (!extensionMethodInfo.TryGetValue(receiverTypeName, out var arrayBuilder))
353arrayBuilder = ArrayBuilder<int>.GetInstance();
src\Compilers\Core\Portable\Collections\ArrayBuilderExtensions.cs (24)
15public static bool Any<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate)
27public static bool Any<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg)
39public static bool All<T>(this ArrayBuilder<T> builder, Func<T, bool> predicate)
51public static bool All<T, A>(this ArrayBuilder<T> builder, Func<T, A, bool> predicate, A arg)
71public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TResult> map)
91var builder = ArrayBuilder<TResult>.GetInstance(items.Count);
111public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, TArg, TResult> map, TArg arg)
131var builder = ArrayBuilder<TResult>.GetInstance(items.Count);
151public static ImmutableArray<TResult> SelectAsArrayWithIndex<TItem, TArg, TResult>(this ArrayBuilder<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
171var builder = ArrayBuilder<TResult>.GetInstance(items.Count);
181public static void AddOptional<T>(this ArrayBuilder<T> builder, T? item)
193public static void Push<T>(this ArrayBuilder<T> builder, T e)
198public static T Pop<T>(this ArrayBuilder<T> builder)
205public static bool TryPop<T>(this ArrayBuilder<T> builder, [MaybeNullWhen(false)] out T result)
217public static T Peek<T>(this ArrayBuilder<T> builder)
222public static ImmutableArray<T> ToImmutableOrEmptyAndFree<T>(this ArrayBuilder<T>? builder)
227public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value)
236public static void AddIfNotNull<T>(this ArrayBuilder<T> builder, T? value)
245public static void FreeAll<T>(this ArrayBuilder<T> builder, Func<T, ArrayBuilder<T>?> getNested)
275public static void RemoveWhere<TItem, TArg>(this ArrayBuilder<TItem> builder, Func<TItem, int, TArg, bool> filter, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (21)
41private delegate LineColumnDelta Formatter<T>(LineColumn lineColumn, SyntaxTrivia trivia, ArrayBuilder<T> changes, CancellationToken cancellationToken);
46private delegate void WhitespaceAppender<T>(LineColumn lineColumn, LineColumnDelta delta, TextSpan span, ArrayBuilder<T> changes);
185protected abstract LineColumnDelta Format(LineColumn lineColumn, SyntaxTrivia trivia, ArrayBuilder<SyntaxTrivia> changes, CancellationToken cancellationToken);
190protected abstract LineColumnDelta Format(LineColumn lineColumn, SyntaxTrivia trivia, ArrayBuilder<TextChange> changes, CancellationToken cancellationToken);
240using var _ = ArrayBuilder<SyntaxTrivia>.GetInstance(out var triviaList);
260private static void AddRange(ArrayBuilder<SyntaxTrivia> result, SyntaxTriviaList triviaList)
268using var _ = ArrayBuilder<TextChange>.GetInstance(out var changes);
284private LineColumn FormatTrivia<T>(Formatter<T> formatter, WhitespaceAppender<T> whitespaceAdder, ArrayBuilder<T> changes, CancellationToken cancellationToken)
378ArrayBuilder<T> changes,
625private void AddExtraLines(int linesBetweenTokens, ArrayBuilder<SyntaxTrivia> changes)
629using var _ = ArrayBuilder<SyntaxTrivia>.GetInstance(out var lineBreaks);
642private int GetInsertionIndex(ArrayBuilder<SyntaxTrivia> changes)
675private void AddExtraLines(int linesBetweenTokens, ArrayBuilder<TextChange> changes)
713private bool TryGetMatchingChangeIndex(ArrayBuilder<TextChange> changes, out int index)
731private TextSpan GetInsertionSpan(ArrayBuilder<TextChange> changes)
758ArrayBuilder<SyntaxTrivia> changes)
767ArrayBuilder<SyntaxTrivia> changes)
826private void AddWhitespaceTextChange(LineColumn lineColumn, LineColumnDelta delta, TextSpan span, ArrayBuilder<TextChange> changes)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (6)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
79if (!dictionary.TryGetValue(key, out var builder))
81builder = ArrayBuilder<TValue>.GetInstance();
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
91if (!dictionary.TryGetValue(key, out var builder))
93builder = ArrayBuilder<TValue>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (10)
29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders)
43public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders)
57public static void FreeValues<K, V>(this IReadOnlyDictionary<K, ArrayBuilder<V>> builders)
66public static ImmutableArray<T> ToFlattenedImmutableArrayAndFree<T>(this ArrayBuilder<ArrayBuilder<T>> builders)
80var result = ArrayBuilder<T>.GetInstance(builders.Sum(b => b.Count));
82foreach (var builder in builders)
96public static bool HasDuplicates<T>(this ArrayBuilder<T> builder)
99public static bool HasDuplicates<T, U>(this ArrayBuilder<T> builder, Func<T, U> selector)