145 references to CollectionKind
System.Private.DataContractSerialization (145)
System\Runtime\Serialization\CollectionDataContract.cs (52)
99
internal CollectionDataContract(Type type,
CollectionKind
kind) : base(new CollectionDataContractCriticalHelper(type, kind))
106
private CollectionDataContract(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, string? serializationExceptionMessage, string? deserializationExceptionMessage)
114
private CollectionDataContract(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor)
122
private CollectionDataContract(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired)
143
if (_helper.Kind ==
CollectionKind
.Dictionary || _helper.Kind ==
CollectionKind
.GenericDictionary)
152
internal
CollectionKind
Kind => _helper.Kind;
353
if (UnderlyingType.IsInterface && (Kind ==
CollectionKind
.Enumerable || Kind ==
CollectionKind
.Collection || Kind ==
CollectionKind
.GenericEnumerable))
363
if (Kind !=
CollectionKind
.Array && AddMethod == null)
406
private
CollectionKind
_kind;
444
private void Init(
CollectionKind
kind, Type? itemType, CollectionDataContractAttribute? collectionContractAttribute)
452
bool isDictionary = (kind ==
CollectionKind
.Dictionary || kind ==
CollectionKind
.GenericDictionary);
509
Init(
CollectionKind
.Array, type.GetElementType(), null);
517
CollectionKind
kind) : base(type)
535
Init(
CollectionKind
.Array, type.GetElementType(), null);
544
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, string? serializationExceptionMessage, string? deserializationExceptionMessage)
567
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor)
580
internal CollectionDataContractCriticalHelper(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo? addMethod, ConstructorInfo? constructor, bool isConstructorCheckRequired)
593
Init(
CollectionKind
.Collection, null /*itemType*/, null);
597
internal
CollectionKind
Kind => _kind;
753
case
CollectionKind
.Collection:
754
case
CollectionKind
.List:
755
case
CollectionKind
.Dictionary:
763
case
CollectionKind
.GenericCollection:
764
case
CollectionKind
.GenericList:
770
case
CollectionKind
.GenericDictionary:
816
if (Kind ==
CollectionKind
.GenericDictionary)
827
else if (Kind ==
CollectionKind
.Dictionary)
843
Debug.Assert(Kind !=
CollectionKind
.Array, "GetCollectionElementType should not be called on Arrays");
847
if (Kind ==
CollectionKind
.GenericDictionary)
852
else if (Kind ==
CollectionKind
.Dictionary)
871
if (Kind ==
CollectionKind
.GenericDictionary || Kind ==
CollectionKind
.GenericCollection || Kind ==
CollectionKind
.GenericEnumerable)
1098
dataContract = new CollectionDataContract(type, (
CollectionKind
)(i + 1), itemType, getEnumeratorMethod, addMethod, null/*defaultCtor*/);
1128
CollectionKind
kind =
CollectionKind
.None;
1139
CollectionKind
currentKind = (
CollectionKind
)(i + 1);
1140
if (kind ==
CollectionKind
.None || currentKind < kind)
1153
if (kind ==
CollectionKind
.None)
1160
if (kind ==
CollectionKind
.Enumerable || kind ==
CollectionKind
.Collection || kind ==
CollectionKind
.GenericEnumerable)
1207
case
CollectionKind
.GenericDictionary:
1213
case
CollectionKind
.Dictionary:
1217
case
CollectionKind
.GenericList:
1218
case
CollectionKind
.GenericCollection:
1222
case
CollectionKind
.List:
System\Runtime\Serialization\Json\JsonCollectionDataContract.cs (4)
69
CollectionKind
kind = this.TraditionalCollectionDataContract.Kind;
70
if (this.TraditionalDataContract.UnderlyingType.IsInterface && (kind ==
CollectionKind
.Enumerable || kind ==
CollectionKind
.Collection || kind ==
CollectionKind
.GenericEnumerable))
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (18)
603
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
609
case
CollectionKind
.GenericDictionary:
613
case
CollectionKind
.Dictionary:
617
case
CollectionKind
.Collection:
618
case
CollectionKind
.GenericCollection:
619
case
CollectionKind
.Enumerable:
620
case
CollectionKind
.GenericEnumerable:
621
case
CollectionKind
.List:
622
case
CollectionKind
.GenericList:
645
bool canReadSimpleDictionary = collectionContract.Kind ==
CollectionKind
.Dictionary ||
646
collectionContract.Kind ==
CollectionKind
.GenericDictionary;
824
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
833
bool canReadSimpleDictionary = collectionContract.Kind ==
CollectionKind
.Dictionary ||
834
collectionContract.Kind ==
CollectionKind
.GenericDictionary;
964
if (collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary)
988
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary || collectionContract.Kind ==
CollectionKind
.Dictionary)
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (13)
314
if (collectionContract.Kind ==
CollectionKind
.Array)
344
case
CollectionKind
.Collection:
345
case
CollectionKind
.List:
346
case
CollectionKind
.Dictionary:
349
case
CollectionKind
.GenericCollection:
350
case
CollectionKind
.GenericList:
353
case
CollectionKind
.GenericDictionary:
365
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary)
371
else if (collectionContract.Kind ==
CollectionKind
.Dictionary)
393
CollectionKind
kind = collectionContract.Kind;
394
if (kind ==
CollectionKind
.GenericDictionary || kind ==
CollectionKind
.GenericCollection || kind ==
CollectionKind
.GenericEnumerable)
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (4)
121
Debug.Assert(collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary);
135
bool canReadSimpleDictionary = collectionContract.Kind ==
CollectionKind
.Dictionary
136
|| collectionContract.Kind ==
CollectionKind
.GenericDictionary;
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (5)
40
if (collectionContract.Kind ==
CollectionKind
.Array)
64
bool canWriteSimpleDictionary = collectionContract.Kind ==
CollectionKind
.GenericDictionary
65
|| collectionContract.Kind ==
CollectionKind
.Dictionary;
102
bool isDictionary = collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary;
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
215
if (((CollectionDataContract)dataContract).Kind ==
CollectionKind
.Dictionary)
System\Runtime\Serialization\ReflectionReader.cs (15)
101
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
128
if (collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary)
459
case
CollectionKind
.Collection:
460
case
CollectionKind
.GenericCollection:
461
case
CollectionKind
.Enumerable:
462
case
CollectionKind
.GenericEnumerable:
463
case
CollectionKind
.List:
464
case
CollectionKind
.GenericList:
473
return collectionContract.Kind ==
CollectionKind
.Array || IsArrayLikeInterface(collectionContract);
487
else if (collectionContract.Kind ==
CollectionKind
.GenericDictionary && collectionContract.UnderlyingType.IsInterface)
528
if (isReadOnlyCollection && collectionContract.Kind ==
CollectionKind
.Array)
551
else if (collectionContract.Kind ==
CollectionKind
.GenericDictionary || collectionContract.Kind ==
CollectionKind
.Dictionary)
558
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary)
System\Runtime\Serialization\ReflectionXmlFormatReader.cs (2)
126
Debug.Assert(collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary);
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (3)
38
if (collectionDataContract.Kind ==
CollectionKind
.Array)
73
bool isDictionary = collectionDataContract.Kind ==
CollectionKind
.Dictionary || collectionDataContract.Kind ==
CollectionKind
.GenericDictionary;
System\Runtime\Serialization\SchemaImporter.cs (1)
1051
CollectionDataContract dataContract = new CollectionDataContract(Globals.TypeOfSchemaDefinedType,
CollectionKind
.Array);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (14)
637
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
645
case
CollectionKind
.GenericDictionary:
649
case
CollectionKind
.Dictionary:
653
case
CollectionKind
.Collection:
654
case
CollectionKind
.GenericCollection:
655
case
CollectionKind
.Enumerable:
656
case
CollectionKind
.GenericEnumerable:
657
case
CollectionKind
.List:
658
case
CollectionKind
.GenericList:
779
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
892
if (collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary)
917
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary || collectionContract.Kind ==
CollectionKind
.Dictionary)
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (13)
394
if (collectionContract.Kind ==
CollectionKind
.Array)
423
case
CollectionKind
.Collection:
424
case
CollectionKind
.List:
425
case
CollectionKind
.Dictionary:
428
case
CollectionKind
.GenericCollection:
429
case
CollectionKind
.GenericList:
432
case
CollectionKind
.GenericDictionary:
444
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary)
450
else if (collectionContract.Kind ==
CollectionKind
.Dictionary)
472
CollectionKind
kind = collectionContract.Kind;
473
if (kind ==
CollectionKind
.GenericDictionary || kind ==
CollectionKind
.GenericCollection || kind ==
CollectionKind
.GenericEnumerable)