25 references to SegmentedList
Microsoft.CodeAnalysis (6)
PEWriter\FullMetadataWriter.cs (1)
437_rows = new SegmentedList<T>(capacity);
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (3)
438var list = new SegmentedList<TOutput>(_size); 744return LazyInitializer.EnsureInitialized(ref s_emptyEnumerator, static () => new Enumerator(new SegmentedList<T>(0)))!; 764var list = new SegmentedList<T>(count);
Text\LargeText.cs (1)
243var list = new SegmentedList<int>(Length / 64);
Text\SourceText.cs (1)
1073var lineStarts = new SegmentedList<int>(Length / 64)
Microsoft.CodeAnalysis.UnitTests (19)
Collections\List\SegmentedList.Generic.Tests.Capacity.cs (7)
39var list = new SegmentedList<T>(initialCapacity); 55var list = new SegmentedList<T>(initialCapacity); 68var segmented = new SegmentedList<object>(initialCapacity); 96var segmented = new SegmentedList<object>(initialCapacity); 117var list = new SegmentedList<T>(initialCapacity); 131var list = new SegmentedList<T>(elementCount); 148var list = new SegmentedList<T>(elementCount);
Collections\List\SegmentedList.Generic.Tests.Constructor.cs (2)
42SegmentedList<T> list = new SegmentedList<T>(capacity); 53Assert.Throws<ArgumentOutOfRangeException>(() => new SegmentedList<T>(capacity));
Collections\SegmentedCollectionsMarshalTests.cs (10)
422Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<int>(0)).IsEmpty); 423Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<int?>(0)).IsEmpty); 424Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<Guid>(0)).IsEmpty); 425Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<Guid?>(0)).IsEmpty); 426Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<string>(0)).IsEmpty); 427Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<CustomClass>(0)).IsEmpty); 428Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<ManagedCustomStruct>(0)).IsEmpty); 429Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<ManagedCustomStruct?>(0)).IsEmpty); 430Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<UnmanagedCustomStruct>(0)).IsEmpty); 431Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<UnmanagedCustomStruct?>(0)).IsEmpty);