10 instantiations of SegmentedList
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (3)
74public static readonly ImmutableSegmentedList<T> Empty = new(new SegmentedList<T>()); 145var list = new SegmentedList<T> { value }; 174var list = new SegmentedList<T>(items);
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (2)
78_mutableList = new SegmentedList<T>(originalList._list); 110_mutableList = new SegmentedList<T>();
src\Dependencies\Collections\RoslynEnumerable.cs (1)
18return new SegmentedList<TSource>(source);
src\Dependencies\Collections\SegmentedList`1.cs (4)
436var list = new SegmentedList<TOutput>(_size); 598var list = new SegmentedList<T>(); 742return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedList<T>(0)))!; 762var list = new SegmentedList<T>(count);
61 references to SegmentedList
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (61)
src\Dependencies\Collections\ImmutableSegmentedList`1.cs (4)
76private readonly SegmentedList<T> _list; 78private ImmutableSegmentedList(SegmentedList<T> list) 145var list = new SegmentedList<T> { value }; 174var list = new SegmentedList<T>(items);
src\Dependencies\Collections\ImmutableSegmentedList`1+Enumerator.cs (3)
14private readonly SegmentedList<T> _list; 15private SegmentedList<T>.Enumerator _enumerator; 17internal Enumerator(SegmentedList<T> list)
src\Dependencies\Collections\ImmutableSegmentedList`1+PrivateMarshal.cs (6)
20var list = Volatile.Read(ref Unsafe.AsRef(in location._list)); 29var list = Interlocked.Exchange(ref Unsafe.AsRef(in location._list), value._list); 38var list = Interlocked.CompareExchange(ref Unsafe.AsRef(in location._list), value._list, comparand._list); 45/// <inheritdoc cref="SegmentedCollectionsMarshal.AsImmutableSegmentedList{T}(SegmentedList{T}?)"/> 46internal static ImmutableSegmentedList<T> AsImmutableSegmentedList(SegmentedList<T>? list) 50internal static SegmentedList<T>? AsSegmentedList(ImmutableSegmentedList<T> list)
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (3)
25private SegmentedList<T>? _mutableList; 35private readonly SegmentedList<T> ReadOnlyList => _mutableList ?? _list._list; 70private SegmentedList<T> GetOrCreateMutableList()
src\Dependencies\Collections\RoslynEnumerable.cs (1)
13public static SegmentedList<TSource> ToSegmentedList<TSource>(this IEnumerable<TSource> source)
src\Dependencies\Collections\SegmentedCollectionsMarshal.cs (7)
96/// Gets an <see cref="ImmutableSegmentedList{T}"/> value wrapping the input <see cref="SegmentedList{T}"/>. 114public static ImmutableSegmentedList<T> AsImmutableSegmentedList<T>(SegmentedList<T>? list) 118/// Gets the underlying <see cref="SegmentedList{T}"/> for an input <see cref="ImmutableSegmentedList{T}"/> value. 121/// <param name="list">The input <see cref="ImmutableSegmentedList{T}"/> value to get the underlying <see cref="SegmentedList{T}"/> from.</param> 122/// <returns>The underlying <see cref="SegmentedList{T}"/> for <paramref name="list"/>, if present; otherwise, <see langword="null"/>.</returns> 131/// <see langword="true"/>), the resulting <see cref="SegmentedList{T}"/> will be <see langword="null"/>. 134public static SegmentedList<T>? AsSegmentedList<T>(ImmutableSegmentedList<T> list)
src\Dependencies\Collections\SegmentedList`1.cs (18)
78if (collection is SegmentedList<T> segmentedList) 312if (c is SegmentedList<T> list) 429public SegmentedList<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter) 436var list = new SegmentedList<TOutput>(_size); 591public SegmentedList<T> FindAll(Predicate<T> match) 598var list = new SegmentedList<T>(); 745public SegmentedList<T> GetRange(int index, int count) 762var list = new SegmentedList<T>(count); 769/// Creates a shallow copy of a range of elements in the source <see cref="SegmentedList{T}" />. 771/// <param name="start">The zero-based <see cref="SegmentedList{T}" /> index at which the range starts.</param> 773/// <returns>A shallow copy of a range of elements in the source <see cref="SegmentedList{T}" />.</returns> 779/// <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> 780public SegmentedList<T> Slice(int start, int length) => GetRange(start, length); 924else if (c is SegmentedList<T> list) 1319private readonly SegmentedList<T> _list; 1324internal Enumerator(SegmentedList<T> list) 1338var localList = _list; 1390internal readonly struct TestAccessor(SegmentedList<T> instance)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
43public static PooledObject<SegmentedList<TItem>> GetPooledObject<TItem>(this ObjectPool<SegmentedList<TItem>> pool) 44=> PooledObject<SegmentedList<TItem>>.Create(pool); 60public static PooledObject<SegmentedList<TItem>> GetPooledObject<TItem>(this ObjectPool<SegmentedList<TItem>> pool, out SegmentedList<TItem> list) 62var pooledObject = PooledObject<SegmentedList<TItem>>.Create(pool); 158public static SegmentedList<T> AllocateAndClear<T>(this ObjectPool<SegmentedList<T>> pool) 160var list = pool.Allocate(); 336public static void ClearAndFree<T>(this ObjectPool<SegmentedList<T>> pool, SegmentedList<T> list, bool trim = true)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
98public static PooledObject<SegmentedList<TItem>> Create<TItem>(ObjectPool<SegmentedList<TItem>> pool) 100return new PooledObject<SegmentedList<TItem>>( 153private static SegmentedList<TItem> Allocator<TItem>(ObjectPool<SegmentedList<TItem>> pool) 156private static void Releaser<TItem>(ObjectPool<SegmentedList<TItem>> pool, SegmentedList<TItem> obj)