22 references to AsImmutableSegmentedList
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
47/// <inheritdoc cref="SegmentedCollectionsMarshal.AsImmutableSegmentedList{T}(SegmentedList{T}?)"/>
Microsoft.CodeAnalysis.UnitTests (21)
Collections\SegmentedCollectionsMarshalTests.cs (21)
407Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<int>(null).IsDefault); 408Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<int?>(null).IsDefault); 409Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<Guid>(null).IsDefault); 410Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<Guid?>(null).IsDefault); 411Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<string>(null).IsDefault); 412Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<CustomClass>(null).IsDefault); 413Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<ManagedCustomStruct>(null).IsDefault); 414Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<ManagedCustomStruct?>(null).IsDefault); 415Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<UnmanagedCustomStruct>(null).IsDefault); 416Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList<UnmanagedCustomStruct?>(null).IsDefault); 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); 440ImmutableSegmentedList<T> immutableList = SegmentedCollectionsMarshal.AsImmutableSegmentedList(list);