102 references to CollectionKind
System.Runtime.Serialization (102)
System\Runtime\Serialization\CollectionDataContract.cs (38)
94
internal CollectionDataContract(
CollectionKind
kind)
122
CollectionDataContract(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, string serializationExceptionMessage, string deserializationExceptionMessage)
131
CollectionDataContract(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor)
140
CollectionDataContract(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired)
161
if (helper.Kind ==
CollectionKind
.Dictionary || helper.Kind ==
CollectionKind
.GenericDictionary)
180
internal
CollectionKind
Kind
456
if (this.UnderlyingType.IsInterface && (this.Kind ==
CollectionKind
.Enumerable || this.Kind ==
CollectionKind
.Collection || this.Kind ==
CollectionKind
.GenericEnumerable))
464
Fx.Assert(this.AddMethod != null || this.Kind ==
CollectionKind
.Array, "Add method cannot be null if the collection is being used as a get-only property");
483
CollectionKind
kind;
526
void Init(
CollectionKind
kind, Type itemType, CollectionDataContractAttribute collectionContractAttribute)
534
bool isDictionary = (kind ==
CollectionKind
.Dictionary || kind ==
CollectionKind
.GenericDictionary);
580
internal CollectionDataContractCriticalHelper(
CollectionKind
kind)
595
Init(
CollectionKind
.Array, type.GetElementType(), null);
606
Init(
CollectionKind
.Array, type.GetElementType(), null);
610
internal CollectionDataContractCriticalHelper(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, string serializationExceptionMessage, string deserializationExceptionMessage)
628
internal CollectionDataContractCriticalHelper(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor)
638
internal CollectionDataContractCriticalHelper(Type type,
CollectionKind
kind, Type itemType, MethodInfo getEnumeratorMethod, MethodInfo addMethod, ConstructorInfo constructor, bool isConstructorCheckRequired)
647
Init(
CollectionKind
.Collection, null /*itemType*/, null);
651
internal
CollectionKind
Kind
989
dataContract = new CollectionDataContract(type, (
CollectionKind
)(i + 1), itemType, getEnumeratorMethod, addMethod, null/*defaultCtor*/);
1017
CollectionKind
kind =
CollectionKind
.None;
1028
CollectionKind
currentKind = (
CollectionKind
)(i + 1);
1029
if (kind ==
CollectionKind
.None || currentKind < kind)
1042
if (kind ==
CollectionKind
.None)
1048
if (kind ==
CollectionKind
.Enumerable || kind ==
CollectionKind
.Collection || kind ==
CollectionKind
.GenericEnumerable)
1090
case
CollectionKind
.GenericDictionary:
1096
case
CollectionKind
.Dictionary:
1100
case
CollectionKind
.GenericList:
1101
case
CollectionKind
.GenericCollection:
1105
case
CollectionKind
.List:
System\Runtime\Serialization\Json\JsonCollectionDataContract.cs (4)
67
CollectionKind
kind = this.TraditionalCollectionDataContract.Kind;
68
if (this.TraditionalDataContract.UnderlyingType.IsInterface && (kind ==
CollectionKind
.Enumerable || kind ==
CollectionKind
.Collection || kind ==
CollectionKind
.GenericEnumerable))
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (18)
645
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
651
case
CollectionKind
.GenericDictionary:
655
case
CollectionKind
.Dictionary:
659
case
CollectionKind
.Collection:
660
case
CollectionKind
.GenericCollection:
661
case
CollectionKind
.Enumerable:
662
case
CollectionKind
.GenericEnumerable:
663
case
CollectionKind
.List:
664
case
CollectionKind
.GenericList:
687
bool canReadSimpleDictionary = collectionContract.Kind ==
CollectionKind
.Dictionary ||
688
collectionContract.Kind ==
CollectionKind
.GenericDictionary;
861
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
870
bool canReadSimpleDictionary = collectionContract.Kind ==
CollectionKind
.Dictionary ||
871
collectionContract.Kind ==
CollectionKind
.GenericDictionary;
994
if (collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary)
1016
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary || collectionContract.Kind ==
CollectionKind
.Dictionary)
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (13)
357
if (collectionContract.Kind ==
CollectionKind
.Array)
385
case
CollectionKind
.Collection:
386
case
CollectionKind
.List:
387
case
CollectionKind
.Dictionary:
390
case
CollectionKind
.GenericCollection:
391
case
CollectionKind
.GenericList:
394
case
CollectionKind
.GenericDictionary:
406
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary)
412
else if (collectionContract.Kind ==
CollectionKind
.Dictionary)
436
CollectionKind
kind = collectionContract.Kind;
437
if (kind ==
CollectionKind
.GenericDictionary || kind ==
CollectionKind
.GenericCollection || kind ==
CollectionKind
.GenericEnumerable)
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
310
if (((CollectionDataContract)dataContract).Kind ==
CollectionKind
.Dictionary)
System\Runtime\Serialization\SchemaImporter.cs (1)
1068
CollectionDataContract dataContract = new CollectionDataContract(
CollectionKind
.Array);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (14)
600
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
608
case
CollectionKind
.GenericDictionary:
612
case
CollectionKind
.Dictionary:
616
case
CollectionKind
.Collection:
617
case
CollectionKind
.GenericCollection:
618
case
CollectionKind
.Enumerable:
619
case
CollectionKind
.GenericEnumerable:
620
case
CollectionKind
.List:
621
case
CollectionKind
.GenericList:
739
bool isArray = (collectionContract.Kind ==
CollectionKind
.Array);
846
if (collectionContract.Kind ==
CollectionKind
.Dictionary || collectionContract.Kind ==
CollectionKind
.GenericDictionary)
867
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary || collectionContract.Kind ==
CollectionKind
.Dictionary)
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (13)
394
if (collectionContract.Kind ==
CollectionKind
.Array)
421
case
CollectionKind
.Collection:
422
case
CollectionKind
.List:
423
case
CollectionKind
.Dictionary:
426
case
CollectionKind
.GenericCollection:
427
case
CollectionKind
.GenericList:
430
case
CollectionKind
.GenericDictionary:
442
if (collectionContract.Kind ==
CollectionKind
.GenericDictionary)
448
else if (collectionContract.Kind ==
CollectionKind
.Dictionary)
472
CollectionKind
kind = collectionContract.Kind;
473
if (kind ==
CollectionKind
.GenericDictionary || kind ==
CollectionKind
.GenericCollection || kind ==
CollectionKind
.GenericEnumerable)