72 references to CollectionType
System.Text.Json.SourceGeneration (72)
JsonSourceGenerator.Emitter.cs (45)
334CollectionType collectionType = typeGenerationSpec.CollectionType; 346case CollectionType.Array: 347case CollectionType.MemoryOfT: 348case CollectionType.ReadOnlyMemoryOfT: 351case CollectionType.IEnumerable: 352case CollectionType.IDictionary: 353case CollectionType.IList: 356case CollectionType.Stack: 357case CollectionType.Queue: 358string addMethod = collectionType == CollectionType.Stack ? "Push" : "Enqueue"; 362case CollectionType.ImmutableEnumerable: 365case CollectionType.Dictionary: 366case CollectionType.IDictionaryOfTKeyTValue: 367case CollectionType.IReadOnlyDictionary: 371case CollectionType.ImmutableDictionary: 426case CollectionType.Array: 431case CollectionType.MemoryOfT: 432case CollectionType.ReadOnlyMemoryOfT: 437case CollectionType.IListOfT: 438case CollectionType.List: 439case CollectionType.IList: 1480private static string GetCollectionInfoMethodName(CollectionType collectionType) 1484CollectionType.Array => "CreateArrayInfo", 1485CollectionType.List => "CreateListInfo", 1486CollectionType.IListOfT or CollectionType.IList => "CreateIListInfo", 1487CollectionType.ICollectionOfT => "CreateICollectionInfo", 1488CollectionType.IEnumerableOfT or CollectionType.IEnumerable => "CreateIEnumerableInfo", 1489CollectionType.StackOfT or CollectionType.Stack => "CreateStackInfo", 1490CollectionType.QueueOfT or CollectionType.Queue => "CreateQueueInfo", 1491CollectionType.ConcurrentStack => "CreateConcurrentStackInfo", 1492CollectionType.ConcurrentQueue => "CreateConcurrentQueueInfo", 1493CollectionType.ImmutableEnumerable => "CreateImmutableEnumerableInfo", 1494CollectionType.IAsyncEnumerableOfT => "CreateIAsyncEnumerableInfo", 1495CollectionType.MemoryOfT => "CreateMemoryInfo", 1496CollectionType.ReadOnlyMemoryOfT => "CreateReadOnlyMemoryInfo", 1497CollectionType.ISet => "CreateISetInfo", 1499CollectionType.Dictionary => "CreateDictionaryInfo", 1500CollectionType.IDictionaryOfTKeyTValue or CollectionType.IDictionary => "CreateIDictionaryInfo", 1501CollectionType.IReadOnlyDictionary => "CreateIReadOnlyDictionaryInfo", 1502CollectionType.ImmutableDictionary => "CreateImmutableDictionaryInfo",
JsonSourceGenerator.Parser.cs (27)
518CollectionType collectionType = CollectionType.NotApplicable; 744out CollectionType collectionType, 759collectionType = CollectionType.MemoryOfT; 767collectionType = CollectionType.ReadOnlyMemoryOfT; 775collectionType = CollectionType.IAsyncEnumerableOfT; 788collectionType = CollectionType.Array; 793collectionType = CollectionType.ICollectionOfT; 798collectionType = CollectionType.List; 803collectionType = CollectionType.Dictionary; 809collectionType = CollectionType.ImmutableDictionary; 816collectionType = CollectionType.IDictionaryOfTKeyTValue; 823collectionType = CollectionType.IReadOnlyDictionary; 830collectionType = CollectionType.ImmutableEnumerable; 835collectionType = CollectionType.IListOfT; 840collectionType = CollectionType.ISet; 845collectionType = CollectionType.ICollectionOfT; 850collectionType = CollectionType.StackOfT; 855collectionType = CollectionType.QueueOfT; 860collectionType = CollectionType.ConcurrentStack; 865collectionType = CollectionType.ConcurrentQueue; 870collectionType = CollectionType.IEnumerableOfT; 875collectionType = CollectionType.IDictionary; 882collectionType = CollectionType.IList; 887collectionType = CollectionType.Stack; 892collectionType = CollectionType.Queue; 897collectionType = CollectionType.IEnumerable;