10 instantiations of SegmentedList
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
src\Dependencies\Collections\RoslynEnumerable.cs (1)
20
return new
SegmentedList
<TSource>(source);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
76
public static readonly ImmutableSegmentedList<T> Empty = new(new
SegmentedList
<T>());
147
var list = new
SegmentedList
<T> { value };
176
var list = new
SegmentedList
<T>(items);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (2)
80
_mutableList = new
SegmentedList
<T>(originalList._list);
112
_mutableList = new
SegmentedList
<T>();
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
438
var list = new
SegmentedList
<TOutput>(_size);
600
var list = new
SegmentedList
<T>();
744
return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new
SegmentedList
<T>(0)))!;
764
var list = new
SegmentedList
<T>(count);
61 references to SegmentedList
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (61)
src\Dependencies\Collections\RoslynEnumerable.cs (1)
15
public static
SegmentedList
<TSource> ToSegmentedList<TSource>(this IEnumerable<TSource> source)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (4)
78
private readonly
SegmentedList
<T> _list;
80
private ImmutableSegmentedList(
SegmentedList
<T> list)
147
var
list = new SegmentedList<T> { value };
176
var
list = new SegmentedList<T>(items);
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Enumerator.cs (3)
16
private readonly
SegmentedList
<T> _list;
17
private
SegmentedList
<T>.Enumerator _enumerator;
19
internal Enumerator(
SegmentedList
<T> list)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (6)
22
var
list = Volatile.Read(ref Unsafe.AsRef(in location._list));
31
var
list = Interlocked.Exchange(ref Unsafe.AsRef(in location._list), value._list);
40
var
list = Interlocked.CompareExchange(ref Unsafe.AsRef(in location._list), value._list, comparand._list);
47
/// <inheritdoc cref="SegmentedCollectionsMarshal.AsImmutableSegmentedList{T}(
SegmentedList
{T}?)"/>
48
internal static ImmutableSegmentedList<T> AsImmutableSegmentedList(
SegmentedList
<T>? list)
52
internal static
SegmentedList
<T>? AsSegmentedList(ImmutableSegmentedList<T> list)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (3)
27
private
SegmentedList
<T>? _mutableList;
37
private readonly
SegmentedList
<T> ReadOnlyList => _mutableList ?? _list._list;
72
private
SegmentedList
<T> GetOrCreateMutableList()
src\Dependencies\Collections\Segmented\SegmentedCollectionsMarshal.cs (7)
98
/// Gets an <see cref="ImmutableSegmentedList{T}"/> value wrapping the input <see cref="
SegmentedList
{T}"/>.
116
public static ImmutableSegmentedList<T> AsImmutableSegmentedList<T>(
SegmentedList
<T>? list)
120
/// Gets the underlying <see cref="
SegmentedList
{T}"/> for an input <see cref="ImmutableSegmentedList{T}"/> value.
123
/// <param name="list">The input <see cref="ImmutableSegmentedList{T}"/> value to get the underlying <see cref="
SegmentedList
{T}"/> from.</param>
124
/// <returns>The underlying <see cref="
SegmentedList
{T}"/> for <paramref name="list"/>, if present; otherwise, <see langword="null"/>.</returns>
133
/// <see langword="true"/>), the resulting <see cref="
SegmentedList
{T}"/> will be <see langword="null"/>.
136
public static
SegmentedList
<T>? AsSegmentedList<T>(ImmutableSegmentedList<T> list)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (18)
80
if (collection is
SegmentedList
<T> segmentedList)
314
if (c is
SegmentedList
<T> list)
431
public
SegmentedList
<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter)
438
var
list = new SegmentedList<TOutput>(_size);
593
public
SegmentedList
<T> FindAll(Predicate<T> match)
600
var
list = new SegmentedList<T>();
747
public
SegmentedList
<T> GetRange(int index, int count)
764
var
list = new SegmentedList<T>(count);
771
/// Creates a shallow copy of a range of elements in the source <see cref="
SegmentedList
{T}" />.
773
/// <param name="start">The zero-based <see cref="
SegmentedList
{T}" /> index at which the range starts.</param>
775
/// <returns>A shallow copy of a range of elements in the source <see cref="
SegmentedList
{T}" />.</returns>
781
/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="
SegmentedList
{T}" />.</exception>
782
public
SegmentedList
<T> Slice(int start, int length) => GetRange(start, length);
926
else if (c is
SegmentedList
<T> list)
1321
private readonly
SegmentedList
<T> _list;
1326
internal Enumerator(
SegmentedList
<T> list)
1340
var
localList = _list;
1392
internal readonly struct TestAccessor(
SegmentedList
<T> instance)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
43
public static PooledObject<
SegmentedList
<TItem>> GetPooledObject<TItem>(this ObjectPool<
SegmentedList
<TItem>> pool)
44
=> PooledObject<
SegmentedList
<TItem>>.Create(pool);
60
public static PooledObject<
SegmentedList
<TItem>> GetPooledObject<TItem>(this ObjectPool<
SegmentedList
<TItem>> pool, out
SegmentedList
<TItem> list)
62
var pooledObject = PooledObject<
SegmentedList
<TItem>>.Create(pool);
158
public static
SegmentedList
<T> AllocateAndClear<T>(this ObjectPool<
SegmentedList
<T>> pool)
160
var
list = pool.Allocate();
336
public static void ClearAndFree<T>(this ObjectPool<
SegmentedList
<T>> pool,
SegmentedList
<T> list, bool trim = true)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
98
public static PooledObject<
SegmentedList
<TItem>> Create<TItem>(ObjectPool<
SegmentedList
<TItem>> pool)
100
return new PooledObject<
SegmentedList
<TItem>>(
153
private static
SegmentedList
<TItem> Allocator<TItem>(ObjectPool<
SegmentedList
<TItem>> pool)
156
private static void Releaser<TItem>(ObjectPool<
SegmentedList
<TItem>> pool,
SegmentedList
<TItem> obj)