5 instantiations of TemporaryArray
Microsoft.CodeAnalysis.Workspaces (5)
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (2)
96return new TemporaryArray<T>() 453_array = new TemporaryArray<T>(in array);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
30TemporaryArray<(Lazy<TServiceInterface, TMetadata>? lazyService, bool usesFactory)> servicesOfMatchingType = new();
Workspace\Solution\SolutionState.cs (2)
330var langaugeCountDeltas = new TemporaryArray<(string language, int count)>(); 452var languageCountDeltas = new TemporaryArray<(string language, int count)>();
155 references to TemporaryArray
Microsoft.CodeAnalysis.Workspaces (155)
Classification\ClassifierHelper.cs (2)
257using var tempBuffer = TemporaryArray<TClassifiedSpan>.Empty;
CodeActions\CodeAction.cs (2)
428using var result = TemporaryArray<CodeActionOperation>.Empty;
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (14)
84using var overlappingSpans = TemporaryArray<TextChange>.Empty; 85using var intersectingSpans = TemporaryArray<TextChange>.Empty; 96ref TemporaryArray<TextChange> overlappingSpans, 97ref TemporaryArray<TextChange> intersectingSpans) 125in TemporaryArray<TextChange> overlappingSpans, 126in TemporaryArray<TextChange> intersectingSpans) 152in TemporaryArray<TextChange> overlappingSpans, 153in TemporaryArray<TextChange> intersectingSpans) 199in TemporaryArray<TextChange> overlappingSpans, 200in TemporaryArray<TextChange> intersectingSpans) 210in TemporaryArray<TextChange> overlappingSpans) 230in TemporaryArray<TextChange> intersectingSpans)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (8)
272using var aliasSymbols = TemporaryArray<IAliasSymbol>.Empty; 751using var additionalProperties = TemporaryArray<(string key, string value)>.Empty; 779using var additionalProperties = TemporaryArray<(string key, string value)>.Empty; 871using var result = TemporaryArray<string>.Empty;
FindSymbols\SymbolTree\SymbolTreeInfo.cs (13)
170using var similarNames = TemporaryArray<string>.Empty; 171using var result = TemporaryArray<ISymbol>.Empty; 219using var results = TemporaryArray<ISymbol>.Empty; 397int index, INamespaceOrTypeSymbol rootContainer, ref TemporaryArray<ISymbol> results, CancellationToken cancellationToken) 414using var containerSymbols = TemporaryArray<ISymbol>.Empty; 503using var builder = TemporaryArray<INamedTypeSymbol>.Empty; 504using var tempBuilder = TemporaryArray<ISymbol>.Empty;
FindSymbols\SyntaxTree\SyntaxTreeIndex_Forwarders.cs (2)
60using var result = TemporaryArray<string>.Empty;
Options\GlobalOptionService.cs (2)
130using var values = TemporaryArray<object?>.Empty;
PatternMatching\AllLowerCamelCaseMatcher.cs (6)
38in TemporaryArray<TextSpan> candidateHumps, out ImmutableArray<TextSpan> matchedSpans) 65private static PatternMatchKind GetKind(CamelCaseResult result, in TemporaryArray<TextSpan> candidateHumps) 69int patternIndex, int candidateHumpIndex, bool? contiguous, in TemporaryArray<TextSpan> candidateHumps) 149int patternIndex, int humpIndex, bool contiguous, in TemporaryArray<TextSpan> candidateHumps) 211CamelCaseResult result, ref CamelCaseResult? bestResult, TextSpan? matchSpanToAdd, in TemporaryArray<TextSpan> candidateHumps) 240private static bool IsBetter(CamelCaseResult result, CamelCaseResult? currentBestResult, in TemporaryArray<TextSpan> candidateHumps)
PatternMatching\CamelCaseResult.cs (1)
46private static PatternMatchKind GetCamelCaseKind(CamelCaseResult result, in TemporaryArray<TextSpan> candidateHumps)
PatternMatching\ContainerPatternMatcher.cs (4)
45public override bool AddMatches(string? container, ref TemporaryArray<PatternMatch> matches) 56private bool AddMatches(string container, ref TemporaryArray<PatternMatch> matches, bool fuzzyMatch) 63using var tempContainerMatches = TemporaryArray<PatternMatch>.Empty;
PatternMatching\PatternMatcher.cs (12)
106public abstract bool AddMatches(string? candidate, ref TemporaryArray<PatternMatch> matches); 166using var candidateHumps = TemporaryArray<TextSpan>.Empty; 340ref TemporaryArray<PatternMatch> matches, 397using var tempMatches = TemporaryArray<PatternMatch>.Empty; 457in TemporaryArray<TextSpan> candidateHumps) 504in TemporaryArray<TextSpan> candidateHumps, 514in TemporaryArray<TextSpan> candidateHumps, 519ref readonly var patternHumps = ref patternChunk.PatternHumps; 534using var matchSpans = TemporaryArray<TextSpan>.Empty;
PatternMatching\PatternMatcher.TextChunk.cs (2)
33public TemporaryArray<TextSpan> PatternHumps; 46PatternHumps = TemporaryArray<TextSpan>.Empty;
PatternMatching\PatternMatcherExtensions.cs (2)
14using var matches = TemporaryArray<PatternMatch>.Empty;
PatternMatching\SimplePatternMatcher.cs (1)
43public override bool AddMatches(string candidate, ref TemporaryArray<PatternMatch> matches)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (1)
943internal static ImmutableArray<T> AddRange<T>(this ImmutableArray<T> self, in TemporaryArray<T> items)
src\Compilers\Core\Portable\Collections\TemporaryArray`1.cs (11)
76/// This field is initialized to non-<see langword="null"/> the first time the <see cref="TemporaryArray{T}"/> 82private TemporaryArray(in TemporaryArray<T> array) 90public static TemporaryArray<T> GetInstance(int capacity) 102public static TemporaryArray<T> Empty => default; 198public void AddRange(in TemporaryArray<T> items) 326/// Transitions the current <see cref="TemporaryArray{T}"/> from inline storage to dynamic storage storage. An 445private readonly TemporaryArray<T> _array; 450public Enumerator(in TemporaryArray<T> array) 477public static int InlineCapacity => TemporaryArray<T>.InlineCapacity; 479public static bool HasDynamicStorage(in TemporaryArray<T> array) 482public static int InlineCount(in TemporaryArray<T> array)
src\Compilers\Core\Portable\Collections\TemporaryArrayExtensions.cs (13)
14/// Gets a mutable reference to a <see cref="TemporaryArray{T}"/> stored in a <c>using</c> variable. 17/// <para>This supporting method allows <see cref="TemporaryArray{T}"/>, a non-copyable <see langword="struct"/> 38public static ref TemporaryArray<T> AsRef<T>(this in TemporaryArray<T> array) 43public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 54public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 68public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 89public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 110public static T? FirstOrDefault<T>(this in TemporaryArray<T> array) 113public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 124public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 138public static void AddIfNotNull<T>(this ref TemporaryArray<T> array, T? value) 147public static void AddIfNotNull<T>(this ref TemporaryArray<T> array, T? value)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IIntervalTree`1.cs (1)
39int start, int length, ref TemporaryArray<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\ImmutableIntervalTree`1.cs (1)
268int start, int length, ref TemporaryArray<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeAlgorithms`2.cs (5)
23using var result = TemporaryArray<T>.Empty; 50int start, int length, ref TemporaryArray<T> builder, in TIntrospector introspector) 57int start, int length, ref TemporaryArray<T> builder, in TIntrospector introspector) 64int start, int length, ref TemporaryArray<T> builder, in TIntrospector introspector)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
44ref TemporaryArray<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\MutableIntervalTree`1.cs (1)
46int start, int length, ref TemporaryArray<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\SimpleMutableIntervalTree`2.cs (3)
49public void FillWithIntervalsThatOverlapWith(int start, int length, ref TemporaryArray<T> builder) 52public void FillWithIntervalsThatIntersectWith(int start, int length, ref TemporaryArray<T> builder) 55public void FillWithIntervalsThatContain(int start, int length, ref TemporaryArray<T> builder)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (2)
31using var result = TemporaryArray<ISymbol>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
405using var parts = TemporaryArray<TextSpan>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (2)
64public void Find(ref TemporaryArray<string> result, string value, int? threshold = null) 88ref TemporaryArray<string> result,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\InterceptsLocationUtilities.cs (2)
32using var result = TemporaryArray<InterceptsLocationData>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (3)
16public static void AddWordParts(string identifier, ref TemporaryArray<TextSpan> parts) 19public static void AddCharacterParts(string identifier, ref TemporaryArray<TextSpan> parts) 22public static void AddParts(string text, bool word, ref TemporaryArray<TextSpan> parts)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.cs (6)
79using var equivalenceVisitors = TemporaryArray<EquivalenceVisitor>.Empty; 80using var getHashCodeVisitors = TemporaryArray<GetHashCodeVisitor>.Empty; 217using var builder = TemporaryArray<INamedTypeSymbol>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (7)
26private static void AddNode<TSyntaxNode>(bool allowEmptyNodes, ref TemporaryArray<TSyntaxNode> result, TSyntaxNode node) where TSyntaxNode : SyntaxNode 35ParsedDocument document, TextSpan selectionRaw, bool allowEmptyNodes, int maxCount, ref TemporaryArray<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 266ref TemporaryArray<TSyntaxNode> result, 305ref TemporaryArray<TSyntaxNode> result, 351ref TemporaryArray<TSyntaxNode> result, 519ref TemporaryArray<TSyntaxNode> result, 559IEnumerable<SyntaxNode> nodes, bool allowEmptyNodes, int maxCount, ref TemporaryArray<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\IRefactoringHelpersService.cs (1)
57ParsedDocument document, TextSpan selection, bool allowEmptyNodes, int maxCount, ref TemporaryArray<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (4)
127using var statements = TemporaryArray<SyntaxNode>.Empty; 373using var parts = TemporaryArray<TextSpan>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
30TemporaryArray<(Lazy<TServiceInterface, TMetadata>? lazyService, bool usesFactory)> servicesOfMatchingType = new();
Utilities\SpellChecker.cs (3)
25public void FindSimilarWords(ref TemporaryArray<string> similarWords, string value, bool substringsAreSimilar) 27using var result = TemporaryArray<string>.Empty;
Workspace\Solution\ProjectState.cs (1)
1106public void AddDocumentIdsWithFilePath(ref TemporaryArray<DocumentId> temporaryArray, string filePath)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (4)
180using var generatedDocumentsBuilder = TemporaryArray<SourceGeneratedDocumentState>.Empty; 291using var generatedDocumentsBuilder = TemporaryArray<SourceGeneratedDocumentState>.Empty;
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (2)
88using var generators = TemporaryArray<ISourceGenerator>.Empty;
Workspace\Solution\SolutionState.cs (6)
330var langaugeCountDeltas = new TemporaryArray<(string language, int count)>(); 452var languageCountDeltas = new TemporaryArray<(string language, int count)>(); 466private static void AddLanguageCountDelta(ref TemporaryArray<(string language, int count)> languageCountDeltas, string language, int amount) 481private static ImmutableDictionary<string, int> AddLanguageCounts(ImmutableDictionary<string, int> projectCountByLanguage, in TemporaryArray<(string language, int count)> languageCountDeltas) 1180using var result = TemporaryArray<DocumentId>.Empty;
Workspace\Solution\TextDocumentStates.cs (1)
327public void AddDocumentIdsWithFilePath(ref TemporaryArray<DocumentId> temporaryArray, string filePath)