3 instantiations of TemporaryArray
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (3)
src\Dependencies\Collections\TemporaryArray`1.cs (2)
99
return new
TemporaryArray
<T>()
456
_array = new
TemporaryArray
<T>(in array);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
31
TemporaryArray<(Lazy<TServiceInterface, TMetadata>? lazyService, bool usesFactory)> servicesOfMatchingType =
new
();
79 references to TemporaryArray
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (79)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
782
internal static ImmutableArray<T> AddRange<T>(this ImmutableArray<T> self, in
TemporaryArray
<T> items)
src\Dependencies\Collections\TemporaryArray`1.cs (11)
79
/// This field is initialized to non-<see langword="null"/> the first time the <see cref="
TemporaryArray
{T}"/>
85
private TemporaryArray(in
TemporaryArray
<T> array)
93
public static
TemporaryArray
<T> GetInstance(int capacity)
105
public static
TemporaryArray
<T> Empty => default;
201
public void AddRange(in
TemporaryArray
<T> items)
329
/// Transitions the current <see cref="
TemporaryArray
{T}"/> from inline storage to dynamic storage storage. An
448
private readonly
TemporaryArray
<T> _array;
453
public Enumerator(in
TemporaryArray
<T> array)
480
public static int InlineCapacity =>
TemporaryArray
<T>.InlineCapacity;
482
public static bool HasDynamicStorage(in
TemporaryArray
<T> array)
485
public static int InlineCount(in
TemporaryArray
<T> array)
src\Dependencies\Collections\TemporaryArrayExtensions.cs (13)
16
/// Gets a mutable reference to a <see cref="
TemporaryArray
{T}"/> stored in a <c>using</c> variable.
19
/// <para>This supporting method allows <see cref="
TemporaryArray
{T}"/>, a non-copyable <see langword="struct"/>
40
public static ref
TemporaryArray
<T> AsRef<T>(this in
TemporaryArray
<T> array)
45
public static bool Any<T>(this in
TemporaryArray
<T> array, Func<T, bool> predicate)
56
public static bool All<T>(this in
TemporaryArray
<T> array, Func<T, bool> predicate)
70
public static T? SingleOrDefault<T>(this in
TemporaryArray
<T> array, Func<T, bool> predicate)
91
public static T? SingleOrDefault<T, TArg>(this in
TemporaryArray
<T> array, Func<T, TArg, bool> predicate, TArg arg)
112
public static T? FirstOrDefault<T>(this in
TemporaryArray
<T> array)
115
public static T? FirstOrDefault<T, TArg>(this in
TemporaryArray
<T> array, Func<T, TArg, bool> predicate, TArg arg)
126
public static int IndexOf<T, TArg>(this in
TemporaryArray
<T> array, Func<T, TArg, bool> predicate, TArg arg)
140
public static void AddIfNotNull<T>(this ref
TemporaryArray
<T> array, T? value)
149
public static void AddIfNotNull<T>(this ref
TemporaryArray
<T> array, T? value)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IIntervalTree`1.cs (1)
40
int start, int length, ref
TemporaryArray
<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\ImmutableIntervalTree`1.cs (1)
268
int start, int length, ref
TemporaryArray
<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeAlgorithms`2.cs (5)
24
using
var
result =
TemporaryArray
<T>.Empty;
51
int start, int length, ref
TemporaryArray
<T> builder, in TIntrospector introspector)
58
int start, int length, ref
TemporaryArray
<T> builder, in TIntrospector introspector)
65
int start, int length, ref
TemporaryArray
<T> builder, in TIntrospector introspector)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\IntervalTreeHelpers.cs (1)
45
ref
TemporaryArray
<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\MutableIntervalTree`1.cs (1)
47
int start, int length, ref
TemporaryArray
<T> builder,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\SimpleMutableIntervalTree`2.cs (3)
48
public void FillWithIntervalsThatOverlapWith(int start, int length, ref
TemporaryArray
<T> builder)
51
public void FillWithIntervalsThatIntersectWith(int start, int length, ref
TemporaryArray
<T> builder)
54
public void FillWithIntervalsThatContain(int start, int length, ref
TemporaryArray
<T> builder)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolInfoExtensions.cs (2)
32
using
var
result =
TemporaryArray
<ISymbol>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Naming\IdentifierNameParts.cs (5)
29
using
var
parts =
TemporaryArray
<TextSpan>.Empty;
73
private static ImmutableArray<string> CreateWords(in
TemporaryArray
<TextSpan> parts, string name)
75
using
var
words =
TemporaryArray
<string>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
406
using
var
parts =
TemporaryArray
<TextSpan>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (7)
27
private static void AddNode<TSyntaxNode>(bool allowEmptyNodes, ref
TemporaryArray
<TSyntaxNode> result, TSyntaxNode node) where TSyntaxNode : SyntaxNode
60
SourceText sourceText, SyntaxNode root, TextSpan selectionRaw, bool allowEmptyNodes, int maxCount, ref
TemporaryArray
<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
284
ref
TemporaryArray
<TSyntaxNode> result,
323
ref
TemporaryArray
<TSyntaxNode> result,
369
ref
TemporaryArray
<TSyntaxNode> result,
538
ref
TemporaryArray
<TSyntaxNode> result,
572
IEnumerable<SyntaxNode> nodes, bool allowEmptyNodes, int maxCount, ref
TemporaryArray
<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\IRefactoringHelpers.cs (1)
55
SourceText sourceText, SyntaxNode root, TextSpan selection, bool allowEmptyNodes, int maxCount, ref
TemporaryArray
<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.cs (2)
65
public void Find(ref
TemporaryArray
<string> result, string value, int? threshold = null)
89
ref
TemporaryArray
<string> result,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\InterceptsLocationUtilities.cs (2)
33
using
var
result =
TemporaryArray
<InterceptsLocationData>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (3)
16
public static void AddWordParts(string identifier, ref
TemporaryArray
<TextSpan> parts)
19
public static void AddCharacterParts(string identifier, ref
TemporaryArray
<TextSpan> parts)
22
public static void AddParts(string text, bool word, ref
TemporaryArray
<TextSpan> parts)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (6)
81
using
var
equivalenceVisitors =
TemporaryArray
<EquivalenceVisitor>.Empty;
82
using
var
getHashCodeVisitors =
TemporaryArray
<GetHashCodeVisitor>.Empty;
219
using
var
builder =
TemporaryArray
<INamedTypeSymbol>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
24
public void AddRelevantNodes<TSyntaxNode>(SourceText sourceText, SyntaxNode root, TextSpan selection, bool allowEmptyNodes, int maxCount, ref
TemporaryArray
<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (5)
70
using
var
result =
TemporaryArray
<TSyntaxNode>.Empty;
95
using
var
result =
TemporaryArray
<TSyntaxNode>.Empty;
102
this ParsedDocument document, TextSpan span, bool allowEmptyNodes, int maxCount, ref
TemporaryArray
<TSyntaxNode> result, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\IRefactoringHelpersService.cs (1)
20
this IRefactoringHelpersService service, ParsedDocument 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)
122
using
var
statements =
TemporaryArray
<SyntaxNode>.Empty;
368
using
var
parts =
TemporaryArray
<TextSpan>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
31
TemporaryArray
<(Lazy<TServiceInterface, TMetadata>? lazyService, bool usesFactory)> servicesOfMatchingType = new();