35 references to DataContractType
System.Runtime.Serialization.Schema (35)
System\Runtime\Serialization\Schema\CodeExporter.cs (25)
54
if (!(dataContract.IsBuiltInDataContract || dataContract.Is(
DataContractType
.ClassDataContract)))
222
case
DataContractType
.ClassDataContract:
228
case
DataContractType
.CollectionDataContract:
231
case
DataContractType
.EnumDataContract:
262
Debug.Assert(classContract.Is(
DataContractType
.ClassDataContract));
526
if (!dataContract.Is(
DataContractType
.EnumDataContract))
593
return GetReferencedCollectionType(dataContract.As(
DataContractType
.CollectionDataContract));
602
Debug.Assert(collectionContract.Is(
DataContractType
.CollectionDataContract));
613
GenerateKeyValueType(itemContract.As(
DataContractType
.ClassDataContract));
631
Debug.Assert(collectionContract.Is(
DataContractType
.CollectionDataContract));
649
Debug.Assert(collectionContract.Is(
DataContractType
.CollectionDataContract));
658
DataContract? itemContract = collectionContract.BaseContract!.As(
DataContractType
.ClassDataContract);
780
Debug.Assert(classDataContract.Is(
DataContractType
.ClassDataContract));
921
else if (dataContract.Is(
DataContractType
.ClassDataContract))
935
Debug.Assert(classDataContract.Is(
DataContractType
.ClassDataContract));
950
else if (memberContract.Is(
DataContractType
.ClassDataContract))
972
Debug.Assert(classDataContract.Is(
DataContractType
.ClassDataContract));
985
Debug.Assert(classDataContract.Is(
DataContractType
.ClassDataContract));
1060
Debug.Assert(enumDataContract.Is(
DataContractType
.EnumDataContract));
1109
Debug.Assert(classDataContract.Is(
DataContractType
.ClassDataContract));
1169
Debug.Assert(keyValueContract == null || keyValueContract.Is(
DataContractType
.ClassDataContract));
1191
Debug.Assert(collectionContract.Is(
DataContractType
.CollectionDataContract));
1216
GenerateKeyValueType(itemContract.As(
DataContractType
.ClassDataContract));
1613
while (dataContract != null && dataContract.Is(
DataContractType
.CollectionDataContract))
1632
return dataContract != null && dataContract.Is(
DataContractType
.PrimitiveDataContract) && dataContract.UnderlyingType == typeof(object);
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (10)
22
internal static
DataContractType
GetContractType(this DataContract dataContract) => dataContract.ContractType switch
24
"ClassDataContract" =>
DataContractType
.ClassDataContract,
25
"CollectionDataContract" =>
DataContractType
.CollectionDataContract,
26
"EnumDataContract" =>
DataContractType
.EnumDataContract,
27
"PrimitiveDataContract" =>
DataContractType
.PrimitiveDataContract,
28
"XmlDataContract" =>
DataContractType
.XmlDataContract,
29
_ =>
DataContractType
.Unknown
32
internal static bool Is(this DataContract dataContract,
DataContractType
dcType)
37
internal static DataContract? As(this DataContract dataContract,
DataContractType
dcType)
47
if (collectionDataContract.GetContractType() ==
DataContractType
.CollectionDataContract)