2 instantiations of TemporaryArray
Microsoft.CodeAnalysis.Threading.Package (2)
src\Dependencies\Collections\TemporaryArray`1.cs (2)
98
return new
TemporaryArray
<T>()
455
_array = new
TemporaryArray
<T>(in array);
25 references to TemporaryArray
Microsoft.CodeAnalysis.Threading.Package (25)
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
1016
internal static ImmutableArray<T> AddRange<T>(this ImmutableArray<T> self, in
TemporaryArray
<T> items)
src\Dependencies\Collections\TemporaryArray`1.cs (11)
78
/// This field is initialized to non-<see langword="null"/> the first time the <see cref="
TemporaryArray
{T}"/>
84
private TemporaryArray(in
TemporaryArray
<T> array)
92
public static
TemporaryArray
<T> GetInstance(int capacity)
104
public static
TemporaryArray
<T> Empty => default;
200
public void AddRange(in
TemporaryArray
<T> items)
328
/// Transitions the current <see cref="
TemporaryArray
{T}"/> from inline storage to dynamic storage storage. An
447
private readonly
TemporaryArray
<T> _array;
452
public Enumerator(in
TemporaryArray
<T> array)
479
public static int InlineCapacity =>
TemporaryArray
<T>.InlineCapacity;
481
public static bool HasDynamicStorage(in
TemporaryArray
<T> array)
484
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)