22 references to AsImmutableSegmentedDictionary
Microsoft.CodeAnalysis (1)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
51/// <inheritdoc cref="SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary{TKey, TValue}(SegmentedDictionary{TKey, TValue}?)"/>
Microsoft.CodeAnalysis.UnitTests (21)
Collections\SegmentedCollectionsMarshalTests.cs (21)
669Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<int, int>(null).IsDefault); 670Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<int, int?>(null).IsDefault); 671Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<Guid, Guid>(null).IsDefault); 672Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<Guid, Guid?>(null).IsDefault); 673Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<string, string>(null).IsDefault); 674Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<CustomClass, CustomClass>(null).IsDefault); 675Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<ManagedCustomStruct, ManagedCustomStruct>(null).IsDefault); 676Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<ManagedCustomStruct, ManagedCustomStruct?>(null).IsDefault); 677Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<UnmanagedCustomStruct, UnmanagedCustomStruct>(null).IsDefault); 678Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary<UnmanagedCustomStruct, UnmanagedCustomStruct?>(null).IsDefault); 684Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<int, int>(0)).IsEmpty); 685Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<int, int?>(0)).IsEmpty); 686Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<Guid, Guid>(0)).IsEmpty); 687Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<Guid, Guid?>(0)).IsEmpty); 688Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<string, string>(0)).IsEmpty); 689Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<CustomClass, CustomClass>(0)).IsEmpty); 690Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<ManagedCustomStruct, ManagedCustomStruct>(0)).IsEmpty); 691Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<ManagedCustomStruct, ManagedCustomStruct?>(0)).IsEmpty); 692Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<UnmanagedCustomStruct, UnmanagedCustomStruct>(0)).IsEmpty); 693Assert.True(SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(new SegmentedDictionary<UnmanagedCustomStruct, UnmanagedCustomStruct?>(0)).IsEmpty); 702ImmutableSegmentedDictionary<int, TValue> immutableDictionary = SegmentedCollectionsMarshal.AsImmutableSegmentedDictionary(dictionary);