29 references to IsEmpty
Microsoft.CodeAnalysis (10)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
145
if (self.
IsEmpty
)
169
else if (self.
IsEmpty
)
259
if (startIndex == 0 && self.
IsEmpty
)
274
if (count == 0 && startIndex == 0 && self.
IsEmpty
)
350
if (count == 0 && index == 0 && self.
IsEmpty
)
411
if (self.
IsEmpty
)
435
if (self.
IsEmpty
)
640
=>
IsEmpty
? Enumerable.Empty<T>().GetEnumerator() : GetEnumerator();
src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (2)
38
return !immutableList.
IsEmpty
;
110
if (immutableList.
IsEmpty
)
Microsoft.CodeAnalysis.UnitTests (19)
Collections\ImmutableListTestBase.cs (3)
144
Assert.True(FindAllImpl(ImmutableSegmentedList<int>.Empty, n => true).
IsEmpty
);
332
Assert.True(ConvertAllImpl<int, float>(ImmutableSegmentedList<int>.Empty, n => n).
IsEmpty
);
343
Assert.True(GetRangeImpl(ImmutableSegmentedList<int>.Empty, 0, 0).
IsEmpty
);
Collections\ImmutableSegmentedListBuilderTest.cs (2)
419
Assert.True(builder.ToImmutableSegmentedList().
IsEmpty
);
420
Assert.False(list.
IsEmpty
);
Collections\ImmutableSegmentedListTest.cs (4)
111
Assert.True(empty.
IsEmpty
);
130
Assert.False(list.
IsEmpty
);
324
Assert.True(list.
IsEmpty
);
618
Assert.True(ImmutableSegmentedList<int>.Empty.RemoveRange(0, 0).
IsEmpty
);
Collections\SegmentedCollectionsMarshalTests.cs (10)
422
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<int>(0)).
IsEmpty
);
423
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<int?>(0)).
IsEmpty
);
424
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<Guid>(0)).
IsEmpty
);
425
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<Guid?>(0)).
IsEmpty
);
426
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<string>(0)).
IsEmpty
);
427
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<CustomClass>(0)).
IsEmpty
);
428
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<ManagedCustomStruct>(0)).
IsEmpty
);
429
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<ManagedCustomStruct?>(0)).
IsEmpty
);
430
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<UnmanagedCustomStruct>(0)).
IsEmpty
);
431
Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedList(new SegmentedList<UnmanagedCustomStruct?>(0)).
IsEmpty
);