7 types derived from DataContract
System.Private.DataContractSerialization (7)
System\Runtime\Serialization\ClassDataContract.cs (1)
19
internal sealed class ClassDataContract :
DataContract
System\Runtime\Serialization\CollectionDataContract.cs (1)
70
internal sealed class CollectionDataContract :
DataContract
System\Runtime\Serialization\EnumDataContract.cs (1)
16
internal sealed class EnumDataContract :
DataContract
System\Runtime\Serialization\GenericParameterDataContract.cs (1)
10
internal sealed class GenericParameterDataContract :
DataContract
System\Runtime\Serialization\PrimitiveDataContract.cs (1)
14
internal abstract class PrimitiveDataContract :
DataContract
System\Runtime\Serialization\SpecialTypeDataContract.cs (1)
9
internal sealed class SpecialTypeDataContract :
DataContract
System\Runtime\Serialization\XmlDataContract.cs (1)
21
public sealed class XmlDataContract :
DataContract
2132 references to DataContract
System.Private.DataContractSerialization (2064)
System\Runtime\Serialization\AccessorBuilder.cs (3)
29
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
91
throw new InvalidOperationException(SR.Format(SR.InvalidMember,
DataContract
.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name));
155
throw new InvalidOperationException(SR.Format(SR.InvalidMember,
DataContract
.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name));
System\Runtime\Serialization\ClassDataContract.cs (116)
15
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
34
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
35
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
41
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
42
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
57
public override
DataContract
? BaseContract
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
80
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
81
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
116
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
117
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
162
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
185
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
186
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
195
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
196
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
215
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
216
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
225
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
226
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
249
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
250
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
261
DataContract
.ThrowInvalidDataContractException(
265
DataContract
.GetClrTypeFullName(declaringType),
273
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
274
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
275
internal static XmlDictionaryString? GetChildNamespaceToDeclare(
DataContract
dataContract, Type childType, XmlDictionary dictionary)
277
childType =
DataContract
.UnwrapNullableType(childType);
279
&&
DataContract
.GetBuiltInDataContract(childType) == null && childType != Globals.TypeOfDBNull)
281
string ns =
DataContract
.GetXmlName(childType).Namespace;
352
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
353
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
381
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
382
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
389
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
390
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
413
DataContract
.GetClrTypeFullName(UnderlyingType)),
427
DataContract
.GetClrTypeFullName(UnderlyingType)),
439
DataContract
.GetClrTypeFullName(UnderlyingType)),
451
DataContract
.GetClrTypeFullName(UnderlyingType),
464
DataContract
.GetClrTypeFullName(UnderlyingType),
483
DataContract
.GetClrTypeFullName(UnderlyingType),
491
DataContract
.GetClrTypeFullName(UnderlyingType),
519
DataContract
.GetClrTypeFullName(UnderlyingType)),
534
DataContract
.GetClrTypeFullName(UnderlyingType),
547
DataContract
.GetClrTypeFullName(UnderlyingType),
566
DataContract
.GetClrTypeFullName(UnderlyingType),
574
DataContract
.GetClrTypeFullName(UnderlyingType),
587
private sealed class ClassDataContractCriticalHelper :
DataContract
.DataContractCriticalHelper
616
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
617
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
639
throw new InvalidDataContractException(SR.Format(SR.ISerializableCannotHaveDataContract,
DataContract
.GetClrTypeFullName(type)));
648
DataContract
baseContract =
DataContract
.GetDataContract(baseType);
661
DataContract
.GetClrTypeFullName(type),
DataContract
.GetClrTypeFullName(baseType)));
672
throw new InvalidDataContractException(SR.Format(SR.OnlyDataContractTypesCanHaveExtensionData,
DataContract
.GetClrTypeFullName(type)));
721
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
722
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
757
DataContract
.ThrowInvalidDataContractException(
759
DataContract
.GetClrTypeFullName(type),
761
DataContract
.GetClrTypeFullName(BaseClassContract.UnderlyingType),
783
DataContract
.ThrowInvalidDataContractException(
785
DataContract
.GetClrTypeFullName(type),
797
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
798
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
826
ThrowInvalidDataContractException(SR.Format(SR.TooManyDataMembers,
DataContract
.GetClrTypeFullName(member.DeclaringType!), member.Name));
851
ThrowInvalidDataContractException(SR.Format(SR.InvalidMember,
DataContract
.GetClrTypeFullName(type), member.Name));
857
ThrowInvalidDataContractException(SR.Format(SR.InvalidDataMemberName, member.Name,
DataContract
.GetClrTypeFullName(type)));
863
memberContract.Name =
DataContract
.EncodeLocalName(memberContract.Name);
864
memberContract.IsNullable =
DataContract
.IsTypeNullable(memberContract.MemberType);
870
DataContract
.GetClrTypeFullName(member.DeclaringType!),
889
ThrowInvalidDataContractException(SR.Format(SR.TooManyIgnoreDataMemberAttributes,
DataContract
.GetClrTypeFullName(member.DeclaringType!), member.Name));
918
memberContract.Name =
DataContract
.EncodeLocalName(member.Name);
919
memberContract.IsNullable =
DataContract
.IsTypeNullable(memberContract.MemberType);
932
memberContract.Name =
DataContract
.EncodeLocalName(member.Name);
940
DataContract
.GetClrTypeFullName(member.DeclaringType!),
945
memberContract.IsNullable =
DataContract
.IsTypeNullable(memberContract.MemberType);
960
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
961
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1035
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1036
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1039
return
DataContract
.GetXmlName(type, out _hasDataContract);
1108
ThrowInvalidDataContractException(SR.Format(SR.DuplicateExtensionDataSetMethod, method, _extensionDataSetMethod,
DataContract
.GetClrTypeFullName(method.DeclaringType)));
1110
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.ExtensionDataSetMustReturnVoid,
DataContract
.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType);
1112
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.ExtensionDataSetParameterInvalid,
DataContract
.GetClrTypeFullName(method.DeclaringType), method, Globals.TypeOfExtensionDataObject), method.DeclaringType);
1125
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.DuplicateCallback, method, currentCallback,
DataContract
.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType);
1127
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.DuplicateAttribute, prevAttributeType, attributeType,
DataContract
.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType);
1129
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.CallbacksCannotBeVirtualMethods, method,
DataContract
.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType);
1133
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.CallbackMustReturnVoid,
DataContract
.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType);
1135
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.CallbackParameterInvalid,
DataContract
.GetClrTypeFullName(method.DeclaringType), method, Globals.TypeOfStreamingContext), method.DeclaringType);
1208
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1209
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1218
_knownDataContracts =
DataContract
.ImportKnownTypeAttributes(UnderlyingType);
1250
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.SerializationInfo_ConstructorNotFound,
DataContract
.GetClrTypeFullName(UnderlyingType)));
1267
throw new InvalidDataContractException(SR.Format(SR.NonAttributedSerializableTypesMustHaveDefaultConstructor,
DataContract
.GetClrTypeFullName(type)));
1312
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1313
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1314
internal override
DataContract
BindGenericParameters(
DataContract
[] paramContracts, Dictionary<
DataContract
,
DataContract
>? boundContracts = null)
1322
if (boundContracts != null && boundContracts.TryGetValue(this, out
DataContract
? boundContract))
1344
xmlName =
DataContract
.GetXmlName(type.GetGenericTypeDefinition());
1363
boundContracts ??= new Dictionary<
DataContract
,
DataContract
>();
1365
boundClassContract.XmlName = CreateQualifiedName(
DataContract
.ExpandGenericParameters(XmlConvert.DecodeName(xmlName.Name), new GenericNameProvider(
DataContract
.GetClrTypeFullName(UnderlyingType), genericParams)), xmlName.Namespace);
System\Runtime\Serialization\CodeGenerator.cs (11)
120
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
132
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
696
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CanOnlyStoreIntoArgOrLocGot0,
DataContract
.GetClrTypeFullName(var.GetType())));
853
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.UnknownConstantType,
DataContract
.GetClrTypeFullName(valueType)));
992
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayTypeIsNotSupported_GeneratingCode,
DataContract
.GetClrTypeFullName(arrayElementType)));
1030
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayTypeIsNotSupported_GeneratingCode,
DataContract
.GetClrTypeFullName(arrayElementType)));
1160
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoConversionPossibleTo,
DataContract
.GetClrTypeFullName(target)));
1173
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IsNotAssignableFrom,
DataContract
.GetClrTypeFullName(target),
DataContract
.GetClrTypeFullName(source)));
1193
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IsNotAssignableFrom,
DataContract
.GetClrTypeFullName(target),
DataContract
.GetClrTypeFullName(source)));
System\Runtime\Serialization\CollectionDataContract.cs (152)
15
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
79
private
DataContract
? _itemContract;
83
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
84
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
90
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
91
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
92
internal CollectionDataContract(Type type,
DataContract
itemContract) : base(new CollectionDataContractCriticalHelper(type, itemContract))
97
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
98
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
104
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
105
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
112
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
113
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
120
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
121
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
128
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
129
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
137
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
138
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
139
private void InitCollectionDataContract(
DataContract
? sharedTypeContract)
156
internal
DataContract
ItemContract
158
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
159
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
169
internal
DataContract
? SharedTypeContract => _helper.SharedTypeContract;
199
public override
DataContract
BaseContract
201
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
202
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
210
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
211
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
254
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
255
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
270
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
271
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
279
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
280
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
299
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
300
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
308
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
309
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
333
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
334
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
343
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
344
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
381
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
387
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
393
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
394
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
400
private sealed class CollectionDataContractCriticalHelper :
DataContract
.DataContractCriticalHelper
412
private
DataContract
? _itemContract;
413
private
DataContract
? _sharedTypeContract;
442
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
443
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
450
_isItemTypeNullable =
DataContract
.IsTypeNullable(itemType);
459
throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractItemName,
DataContract
.GetClrTypeFullName(UnderlyingType)));
460
itemName =
DataContract
.EncodeLocalName(collectionContractAttribute.ItemName);
466
throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractKeyName,
DataContract
.GetClrTypeFullName(UnderlyingType)));
468
throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractKeyNoDictionary,
DataContract
.GetClrTypeFullName(UnderlyingType), collectionContractAttribute.KeyName));
469
keyName =
DataContract
.EncodeLocalName(collectionContractAttribute.KeyName);
474
throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractValueName,
DataContract
.GetClrTypeFullName(UnderlyingType)));
476
throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractValueNoDictionary,
DataContract
.GetClrTypeFullName(UnderlyingType), collectionContractAttribute.ValueName));
477
valueName =
DataContract
.EncodeLocalName(collectionContractAttribute.ValueName);
484
_itemName = itemName ??
DataContract
.GetXmlName(
DataContract
.UnwrapNullableType(itemType)).Name;
498
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
499
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
508
XmlName =
DataContract
.GetXmlName(type);
512
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
513
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
519
XmlName =
DataContract
.GetXmlName(type);
524
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
525
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
529
DataContract
itemContract) : base(type)
539
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
540
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
553
XmlName =
DataContract
.GetCollectionXmlName(type, itemType, out collectionContractAttribute);
562
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
563
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
571
throw new InvalidDataContractException(SR.Format(SR.CollectionMustHaveAddMethod,
DataContract
.GetClrTypeFullName(type)));
578
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
579
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
586
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
587
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
601
internal
DataContract
ItemContract
603
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
604
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
613
DataContract
.ThrowInvalidDataContractException(
614
SR.Format(SR.DupKeyValueName,
DataContract
.GetClrTypeFullName(UnderlyingType), KeyName),
621
DataContract
.GetDataContract(ItemType);
625
_itemContract =
DataContract
.GetDataContract(ItemType);
636
internal
DataContract
? SharedTypeContract
694
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
695
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
704
_knownDataContracts =
DataContract
.ImportKnownTypeAttributes(UnderlyingType);
746
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
790
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
812
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
839
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
840
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
908
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
909
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
910
private
DataContract
? GetSharedTypeContract(Type type)
932
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
933
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
939
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
940
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
946
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
947
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
953
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
954
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
957
if (type.IsArray &&
DataContract
.GetBuiltInDataContract(type) == null)
965
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
966
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
967
internal static bool TryCreate(Type type, [NotNullWhen(true)] out
DataContract
? dataContract)
972
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
973
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
974
internal static bool TryCreateGetOnlyCollectionDataContract(Type type, [NotNullWhen(true)] out
DataContract
? dataContract)
1005
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1006
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1007
private static bool IsCollectionOrTryCreate(Type type, bool tryCreate, out
DataContract
? dataContract, out Type itemType, bool constructorRequired, bool skipIfReadOnlyContract = false)
1012
if (
DataContract
.GetBuiltInDataContract(type) != null)
1180
SR.CollectionTypeDoesNotHaveAddMethod,
DataContract
.GetClrTypeFullName(itemType), ref dataContract);
1186
GetReadOnlyCollectionExceptionMessages(type, hasCollectionDataContract, SR.CollectionTypeDoesNotHaveAddMethod,
DataContract
.GetClrTypeFullName(itemType), out serializationExceptionMessage, out deserializationExceptionMessage);
1251
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1252
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1253
private static bool HandleIfInvalidCollection(Type type, bool tryCreate, bool hasCollectionDataContract, bool createContractWithException, string message, string? param, ref
DataContract
? dataContract)
1258
throw new InvalidDataContractException(GetInvalidCollectionMessage(message, SR.Format(SR.InvalidCollectionDataContract,
DataContract
.GetClrTypeFullName(type)), param));
1265
dataContract = new CollectionDataContract(type, GetInvalidCollectionMessage(message, SR.Format(SR.InvalidCollectionType,
DataContract
.GetClrTypeFullName(type)), param));
1301
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1377
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1378
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1379
internal override
DataContract
BindGenericParameters(
DataContract
[] paramContracts, Dictionary<
DataContract
,
DataContract
>? boundContracts = null)
1381
DataContract
boundContract;
1398
boundContracts ??= new Dictionary<
DataContract
,
DataContract
>();
1405
boundCollectionContract.XmlName = CreateQualifiedName(
DataContract
.ExpandGenericParameters(XmlConvert.DecodeName(XmlName.Name), new GenericNameProvider(
DataContract
.GetClrTypeFullName(UnderlyingType), paramContracts)),
1406
IsCollectionDataContract(UnderlyingType) ? XmlName.Namespace :
DataContract
.GetCollectionNamespace(boundCollectionContract.ItemContract.XmlName.Namespace));
1410
internal override
DataContract
GetValidContract(bool verifyConstructor = false)
1427
throw new InvalidDataContractException(SR.Format(SR.CollectionTypeDoesNotHaveDefaultCtor,
DataContract
.GetClrTypeFullName(UnderlyingType)));
1453
DataContract
.GetClrTypeFullName(UnderlyingType)),
1464
DataContract
.GetClrTypeFullName(ItemType)),
1475
DataContract
.GetClrTypeFullName(UnderlyingType)),
1486
DataContract
.GetClrTypeFullName(UnderlyingType),
1509
DataContract
.GetClrTypeFullName(UnderlyingType)),
1520
DataContract
.GetClrTypeFullName(ItemType)),
1554
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1555
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1565
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1566
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\ContextAware.cs (12)
16
private (
DataContract
? strong, WeakReference<
DataContract
>? weak)[] _contracts;
17
private ConditionalWeakTable<Type,
DataContract
> _keepAlive;
23
_contracts = new (
DataContract
?, WeakReference<
DataContract
>?)[size];
24
_keepAlive = new ConditionalWeakTable<Type,
DataContract
>();
27
public
DataContract
? GetItem(int index) => _contracts[index].strong ?? (_contracts[index].weak?.TryGetTarget(out
DataContract
? ret) == true ? ret : null);
29
public void SetItem(int index,
DataContract
dataContract)
39
_contracts[index].weak = new WeakReference<
DataContract
>(dataContract);
46
Array.Resize<(
DataContract
?, WeakReference<
DataContract
>?)>(ref _contracts, newSize);
System\Runtime\Serialization\DataContract.cs (230)
20
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
53
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
54
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
55
internal static
DataContract
GetDataContract(Type type)
60
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
61
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
62
internal static
DataContract
GetDataContract(RuntimeTypeHandle typeHandle)
65
DataContract
dataContract = GetDataContractSkipValidation(id, typeHandle, null);
69
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
70
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
71
internal static
DataContract
GetDataContract(int id, RuntimeTypeHandle typeHandle)
73
DataContract
dataContract = GetDataContractSkipValidation(id, typeHandle, null);
77
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
78
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
79
internal static
DataContract
GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type)
84
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
85
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
86
internal static
DataContract
GetGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type? type)
88
DataContract
dataContract = GetGetOnlyCollectionDataContractSkipValidation(id, typeHandle, type);
92
throw new SerializationException(SR.Format(SR.ErrorDeserializing, SR.Format(SR.ErrorTypeInfo,
DataContract
.GetClrTypeFullName(dataContract.UnderlyingType)), SR.Format(SR.NoSetMethodForProperty, string.Empty, string.Empty)));
97
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
98
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
99
internal static
DataContract
GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type)
104
internal static
DataContract
GetDataContractForInitialization(int id)
119
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
120
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
121
internal static
DataContract
? GetBuiltInDataContract(Type type)
126
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
127
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
128
public static
DataContract
? GetBuiltInDataContract(string name, string ns)
133
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
134
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
135
internal static
DataContract
? GetBuiltInDataContract(string typeName)
167
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
168
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
171
throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType,
DataContract
.GetClrTypeFullName(GetType()),
DataContract
.GetClrTypeFullName(UnderlyingType)));
174
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
175
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
178
throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType,
DataContract
.GetClrTypeFullName(GetType()),
DataContract
.GetClrTypeFullName(UnderlyingType)));
181
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
182
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
185
throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType,
DataContract
.GetClrTypeFullName(GetType()),
DataContract
.GetClrTypeFullName(UnderlyingType)));
190
throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType,
DataContract
.GetClrTypeFullName(GetType()),
DataContract
.GetClrTypeFullName(UnderlyingType)));
211
public virtual
DataContract
? BaseContract
213
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
214
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
220
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
221
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
228
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
229
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
282
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
283
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
284
internal virtual
DataContract
BindGenericParameters(
DataContract
[] paramContracts, Dictionary<
DataContract
,
DataContract
>? boundContracts = null)
289
internal virtual
DataContract
GetValidContract(bool verifyConstructor = false)
304
private static readonly ContextAwareDictionary<Type,
DataContract
?> s_typeToBuiltInContract = new();
305
private static Dictionary<XmlQualifiedName,
DataContract
?>? s_nameToBuiltInContract;
306
private static Dictionary<string,
DataContract
?>? s_typeNameToBuiltInContract;
334
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
335
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
336
internal static
DataContract
GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type)
338
DataContract
? dataContract = s_dataContractCache.GetItem(id);
350
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
351
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
352
internal static
DataContract
GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type? type)
354
DataContract
dataContract = s_dataContractCache.GetItem(id) ?? CreateGetOnlyCollectionDataContract(id, typeHandle, type);
358
internal static
DataContract
GetDataContractForInitialization(int id)
360
DataContract
? dataContract = s_dataContractCache.GetItem(id);
370
int id =
DataContract
.GetId(classContract.TypeForInitialization.TypeHandle);
386
private static bool ContractMatches(
DataContract
contract,
DataContract
? cachedContract)
426
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
427
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
428
private static
DataContract
CreateDataContract(int id, RuntimeTypeHandle typeHandle, Type? type)
430
DataContract
? dataContract = s_dataContractCache.GetItem(id);
448
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
449
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
450
private static
DataContract
CreateDataContract(Type type)
456
DataContract
? dataContract = GetBuiltInDataContract(type);
498
private static void AssignDataContractToId(
DataContract
dataContract, int id)
506
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
507
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
508
private static
DataContract
CreateGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type? type)
510
DataContract
? dataContract = null;
531
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
532
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
576
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
577
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
578
internal static
DataContract
? GetBuiltInDataContract(Type type)
585
TryCreateBuiltInDataContract(key, out
DataContract
? dataContract);
590
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
591
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
592
internal static
DataContract
? GetBuiltInDataContract(string name, string ns)
596
s_nameToBuiltInContract ??= new Dictionary<XmlQualifiedName,
DataContract
?>();
599
if (!s_nameToBuiltInContract.TryGetValue(qname, out
DataContract
? dataContract))
610
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
611
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
612
internal static
DataContract
? GetBuiltInDataContract(string typeName)
619
s_typeNameToBuiltInContract ??= new Dictionary<string,
DataContract
?>();
621
if (!s_typeNameToBuiltInContract.TryGetValue(typeName, out
DataContract
? dataContract))
663
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
664
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
665
internal static bool TryCreateBuiltInDataContract(Type type, [NotNullWhen(true)] out
DataContract
? dataContract)
746
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
747
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
748
internal static bool TryCreateBuiltInDataContract(string name, string ns, [NotNullWhen(true)] out
DataContract
? dataContract)
994
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
995
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1085
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1086
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1092
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1093
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1119
return
DataContract
.GetBuiltInDataContract(type) != null ||
1218
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1219
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1225
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1226
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1232
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1233
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1258
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1259
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1267
throw new InvalidDataContractException(SR.Format(SR.InvalidDataContractName,
DataContract
.GetClrTypeFullName(type)));
1270
name =
DataContract
.EncodeLocalName(name);
1279
throw new InvalidDataContractException(SR.Format(SR.InvalidDataContractNamespace,
DataContract
.GetClrTypeFullName(type)));
1288
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1289
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1313
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1314
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1319
DataContract
? builtInContract = GetBuiltInDataContract(type);
1347
throw new InvalidDataContractException(SR.Format(SR.TooManyDataContracts,
DataContract
.GetClrTypeFullName(type)));
1355
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1356
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1362
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1363
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1372
throw new InvalidDataContractException(SR.Format(SR.TooManyCollectionContracts,
DataContract
.GetClrTypeFullName(type)));
1379
throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractName,
DataContract
.GetClrTypeFullName(type)));
1382
name =
DataContract
.EncodeLocalName(name);
1391
throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractNamespace,
DataContract
.GetClrTypeFullName(type)));
1408
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1409
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1415
if (
DataContract
.GetBuiltInDataContract(itemType) != null)
1428
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1429
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1435
GenericInfo genericInfo = new GenericInfo(
DataContract
.GetXmlName(Globals.TypeOfNullable), Globals.TypeOfNullable.FullName!);
1449
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1450
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1456
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1457
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1473
typeName =
DataContract
.GetClrTypeFullName(type).Substring(nsLen).Replace('+', '.');
1495
XmlQualifiedName qname =
DataContract
.GetXmlName(genParam);
1512
return
DataContract
.EncodeLocalName(typeName);
1588
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1589
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1596
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1597
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1601
DataContract
? dataContract = GetBuiltInDataContract(fullTypeName);
1640
localName =
DataContract
.EncodeLocalName(localName);
1869
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1870
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1877
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1878
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1930
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1931
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1940
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1941
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1944
while (type != null &&
DataContract
.IsTypeSerializable(type))
1962
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeOneScheme,
DataContract
.GetClrTypeFullName(type)), type);
1972
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeOneScheme,
DataContract
.GetClrTypeFullName(type)), type);
1978
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeNoData,
DataContract
.GetClrTypeFullName(type)), type);
1982
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeEmptyString,
DataContract
.GetClrTypeFullName(type)), type);
1986
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeUnknownMethod, methodName,
DataContract
.GetClrTypeFullName(type)), type);
1989
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeReturnType,
DataContract
.GetClrTypeFullName(type), methodName), type);
1994
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeMethodNull,
DataContract
.GetClrTypeFullName(type)), type);
2000
DataContract
.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeValidMethodTypes,
DataContract
.GetClrTypeFullName(type)), type);
2024
if (
DataContract
.GetDataContract(type) is CollectionDataContract collectionDataContract && collectionDataContract.IsDictionary &&
2027
DataContract
itemDataContract =
DataContract
.GetDataContract(Globals.TypeOfKeyValuePair.MakeGenericType(collectionDataContract.ItemType.GetGenericArguments()));
2046
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2047
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2050
type =
DataContract
.UnwrapNullableType(type);
2051
DataContract
dataContract =
DataContract
.GetDataContract(type);
2056
else if (nameToDataContractTable.TryGetValue(dataContract.XmlName, out
DataContract
? alreadyExistingContract))
2077
if (other is
DataContract
dataContract)
2195
return (type.Module.Equals(typeof(
DataContract
).Module) || IsAssemblyFriendOfSerialization(type.Assembly)) && !type.IsNestedPrivate;
2255
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2256
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2258
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2259
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2264
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2265
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2276
: this(
DataContract
.GetClrTypeFullName(type.GetGenericTypeDefinition()), type.GetGenericArguments())
2286
DataContract
.GetClrNameAndNamespace(genericTypeName, out string name, out _);
2287
_nestedParamCounts =
DataContract
.GetDataContractNameForGenericName(name, null);
2300
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2301
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2307
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2308
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2324
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2325
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2332
parametersFromBuiltInNamespaces =
DataContract
.IsBuiltInNamespace(GetXmlName(j).Namespace);
2340
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2341
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2350
_genericParams[i] = qname =
DataContract
.GetXmlName(paramType);
2352
_genericParams[i] = qname = ((
DataContract
)o).XmlName;
2373
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2374
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2379
return new XmlQualifiedName(
DataContract
.EncodeLocalName(
DataContract
.ExpandGenericParameters(XmlConvert.DecodeName(_xmlName.Name), this)), _xmlName.Namespace);
2420
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2421
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2428
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2429
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2448
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
2449
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
2460
parametersFromBuiltInNamespaces =
DataContract
.IsBuiltInNamespace(_paramGenericInfos[j].GetXmlNamespace());
System\Runtime\Serialization\DataContractResolver.cs (4)
13
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
14
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
16
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
17
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\DataContractSerializer.cs (67)
12
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
19
private
DataContract
? _rootContract; // post-surrogate
90
Initialize(type, dictionary.Add(rootName), dictionary.Add(
DataContract
.GetNamespace(rootNamespace)), knownTypes, int.MaxValue, ignoreExtensionDataObject, preserveObjectReferences, null, false);
175
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
176
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
222
private
DataContract
RootContract
224
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
225
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
230
_rootContract =
DataContract
.GetDataContract((_serializationSurrogateProvider == null) ? _rootType : GetSurrogatedType(_serializationSurrogateProvider, _rootType));
237
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
238
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
244
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
245
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
253
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
254
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
260
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
261
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
267
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
268
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
274
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
275
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
281
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
282
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
288
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
289
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
295
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
296
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
302
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
303
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
309
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
310
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
316
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
317
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
323
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
324
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
330
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
331
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
337
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
338
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
344
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
345
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
351
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
352
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
358
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
359
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
365
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
366
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
372
DataContract
contract = RootContract;
422
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
423
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
424
internal static
DataContract
GetDataContract(
DataContract
declaredTypeContract, Type declaredType, Type objectType)
436
return
DataContract
.GetDataContract(objectType);
440
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
441
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
450
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
451
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
457
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
458
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
490
DataContract
contract = RootContract;
506
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
507
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
524
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
525
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
536
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
537
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
540
return DataContractSurrogateCaller.GetDataContractType(serializationSurrogateProvider,
DataContract
.UnwrapNullableType(type));
System\Runtime\Serialization\DataContractSet.cs (106)
11
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
18
private Dictionary<
DataContract
, object>? _processedContracts;
34
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
35
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
44
foreach (KeyValuePair<XmlQualifiedName,
DataContract
> pair in dataContractSet.Contracts)
51
foreach (KeyValuePair<
DataContract
, object> pair in dataContractSet._processedContracts)
61
public Dictionary<
DataContract
, object> ProcessedContracts =>
62
_processedContracts ??= new Dictionary<
DataContract
, object>();
78
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
79
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
82
DataContract
dataContract = GetDataContract(type);
87
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
88
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
89
private void Add(
DataContract
dataContract)
94
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
95
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
96
internal void Add(XmlQualifiedName name,
DataContract
dataContract)
103
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
104
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
105
internal void InternalAdd(XmlQualifiedName name,
DataContract
dataContract)
107
if (Contracts.TryGetValue(name, out
DataContract
? dataContractInSet))
115
bool typeNamesEqual = (
DataContract
.GetClrTypeFullName(dataContract.UnderlyingType) ==
DataContract
.GetClrTypeFullName(dataContractInSet.UnderlyingType));
116
throw new InvalidOperationException(SR.Format(SR.DupTypeContractInDataContractSet, (typeNamesEqual ? dataContract.UnderlyingType.AssemblyQualifiedName :
DataContract
.GetClrTypeFullName(dataContract.UnderlyingType)), (typeNamesEqual ? dataContractInSet.UnderlyingType.AssemblyQualifiedName :
DataContract
.GetClrTypeFullName(dataContractInSet.UnderlyingType)), dataContract.XmlName.Name, dataContract.XmlName.Namespace));
139
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
140
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
154
DataContract
memberDataContract = GetMemberTypeDataContract(dataMember);
173
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
174
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
186
DataContract
itemContract = GetItemTypeDataContract(collectionDataContract);
194
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
195
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
201
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
202
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
207
foreach (
DataContract
knownDataContract in knownDataContracts.Values)
214
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
215
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
221
return
DataContract
.GetXmlName(dcType);
223
return
DataContract
.GetXmlName(clrType);
226
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
227
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
228
public
DataContract
GetDataContract(Type type)
231
return
DataContract
.GetDataContract(type);
233
DataContract
? dataContract =
DataContract
.GetBuiltInDataContract(type);
238
dataContract =
DataContract
.GetDataContract(dcType);
249
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
250
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
251
public
DataContract
? GetDataContract(XmlQualifiedName key)
253
DataContract
? dataContract =
DataContract
.GetBuiltInDataContract(key.Name, key.Namespace);
261
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
262
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
263
internal
DataContract
GetMemberTypeDataContract(DataMember dataMember)
276
DataContract
.GetClrTypeFullName(dataMemberType),
277
(dataMember.MemberInfo.DeclaringType != null) ?
DataContract
.GetClrTypeFullName(dataMember.MemberInfo.DeclaringType) : dataMember.MemberInfo.DeclaringType,
281
return
DataContract
.GetGetOnlyCollectionDataContract(
DataContract
.GetId(dataMemberType.TypeHandle), dataMemberType.TypeHandle, dataMemberType);
291
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
292
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
293
internal
DataContract
GetItemTypeDataContract(CollectionDataContract collectionContract)
300
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
301
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
304
if (
DataContract
.GetBuiltInDataContract(key.Name, key.Namespace) != null)
312
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
313
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
321
_referencedTypesDictionary.Add(
DataContract
.GetXmlName(Globals.TypeOfNullable), Globals.TypeOfNullable);
336
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
337
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
352
XmlQualifiedName genericDictionaryName =
DataContract
.GetXmlName(Globals.TypeOfDictionaryGeneric);
359
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
360
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
406
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
407
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
432
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
433
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
434
public Type? GetReferencedType(XmlQualifiedName xmlName,
DataContract
dataContract, out
DataContract
? referencedContract, out object[]? genericParameters, bool? supportGenericTypes = null)
461
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
462
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
463
private Type? GetReferencedGenericTypeInternal(GenericInfo genInfo, out
DataContract
? referencedContract, out object[]? genericParameters)
488
DataContract
[] structureCheckContracts = new
DataContract
[genInfo.Parameters.Count];
493
DataContract
? paramContract = GetDataContract(paramXmlName);
517
referencedContract =
DataContract
.GetDataContract(type).BindGenericParameters(structureCheckContracts);
523
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
524
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
525
private Type? GetReferencedTypeInternal(XmlQualifiedName xmlName,
DataContract
? dataContract)
558
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
559
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
560
internal bool TryGetReferencedType(XmlQualifiedName xmlName,
DataContract
? dataContract, [NotNullWhen(true)] out Type? type)
565
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
566
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
567
internal bool TryGetReferencedCollectionType(XmlQualifiedName xmlName,
DataContract
? dataContract, [NotNullWhen(true)] out Type? type)
572
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
573
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
574
private bool TryGetReferencedType(XmlQualifiedName xmlName,
DataContract
? dataContract, bool useReferencedCollectionTypes, [NotNullWhen(true)] out Type? type)
598
DataContract
other = GetDataContract(conflictingType);
634
internal bool IsContractProcessed(
DataContract
dataContract)
639
internal void SetContractProcessed(
DataContract
dataContract)
644
internal IEnumerator<KeyValuePair<XmlQualifiedName,
DataContract
>> GetEnumerator()
649
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
650
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
657
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
658
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\DataContractSurrogateCaller.cs (15)
14
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
15
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
18
if (
DataContract
.GetBuiltInDataContract(type) != null)
24
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
25
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
30
if (
DataContract
.GetBuiltInDataContract(objType) != null)
36
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
37
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
42
if (
DataContract
.GetBuiltInDataContract(objType) != null)
52
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
53
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
56
if (
DataContract
.GetBuiltInDataContract(clrType) != null)
66
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
67
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
70
if (
DataContract
.GetBuiltInDataContract(typeName, typeNamespace) != null)
System\Runtime\Serialization\DataMember.cs (30)
20
internal DataMember(
DataContract
memberTypeContract, string name, bool isNullable, bool isRequired, bool emitDefaultValue, long order)
65
public
DataContract
MemberTypeContract
67
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
68
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
74
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
75
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
99
private
DataContract
? _memberTypeContract;
118
internal CriticalHelper(
DataContract
memberTypeContract, string name, bool isNullable, bool isRequired, bool emitDefaultValue, long order)
185
internal
DataContract
MemberTypeContract
187
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
188
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
195
_memberTypeContract =
DataContract
.GetGetOnlyCollectionDataContract(
DataContract
.GetId(MemberType.TypeHandle), MemberType.TypeHandle, MemberType);
199
_memberTypeContract =
DataContract
.GetDataContract(MemberType);
227
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
228
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
252
return
DataContract
.FieldRequiresMemberAccess(field);
260
return
DataContract
.MethodRequiresMemberAccess(getMethod) || !
DataContract
.IsTypeVisible(property.PropertyType);
277
return
DataContract
.FieldRequiresMemberAccess(field);
285
return
DataContract
.MethodRequiresMemberAccess(setMethod) || !
DataContract
.IsTypeVisible(property.PropertyType);
291
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
292
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
293
internal DataMember BindGenericParameters(
DataContract
[] paramContracts, Dictionary<
DataContract
,
DataContract
>? boundContracts = null)
295
DataContract
memberTypeContract = MemberTypeContract.BindGenericParameters(paramContracts, boundContracts);
305
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
306
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\EnumDataContract.cs (30)
23
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
24
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
35
public override
DataContract
BaseContract
37
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
38
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
45
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
46
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
76
private sealed class EnumDataContractCriticalHelper :
DataContract
.DataContractCriticalHelper
81
private
DataContract
_baseContract;
122
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
123
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
128
XmlName =
DataContract
.GetXmlName(type, out _hasDataContract);
131
_baseContract =
DataContract
.GetBuiltInDataContract(baseTypeName.Name, baseTypeName.Namespace)!;
148
DataContract
.ThrowInvalidDataContractException(
150
DataContract
.GetClrTypeFullName(type),
158
internal
DataContract
BaseContract => _baseContract;
164
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
165
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
173
_baseContract =
DataContract
.GetBuiltInDataContract(value.Name, value.Namespace)!;
233
ThrowInvalidDataContractException(SR.Format(SR.TooManyEnumMembers,
DataContract
.GetClrTypeFullName(field.DeclaringType!), field.Name));
240
ThrowInvalidDataContractException(SR.Format(SR.InvalidEnumMemberValue, field.Name,
DataContract
.GetClrTypeFullName(type)));
252
ThrowInvalidDataContractException(SR.Format(SR.DataMemberOnEnumField,
DataContract
.GetClrTypeFullName(field.DeclaringType!), field.Name));
321
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnWrite, value,
DataContract
.GetClrTypeFullName(UnderlyingType)));
327
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnWrite, value,
DataContract
.GetClrTypeFullName(UnderlyingType)));
367
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnRead, stringValue,
DataContract
.GetClrTypeFullName(UnderlyingType)));
386
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnRead, value.Substring(index, count),
DataContract
.GetClrTypeFullName(UnderlyingType)));
444
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
445
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
451
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
452
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\ExtensionDataReader.cs (1)
652
throw new XmlException(SR.Format(SR.InvalidDataNode,
DataContract
.GetClrTypeFullName(type)));
System\Runtime\Serialization\GenericParameterDataContract.cs (12)
14
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
15
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
26
private sealed class GenericParameterDataContractCriticalHelper :
DataContract
.DataContractCriticalHelper
30
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
31
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
37
SetDataContractName(
DataContract
.GetXmlName(type));
44
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
45
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
46
internal override
DataContract
BindGenericParameters(
DataContract
[] paramContracts, Dictionary<
DataContract
,
DataContract
>? boundContracts = null)
System\Runtime\Serialization\Globals.cs (2)
303
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
304
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (89)
18
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
33
private
DataContract
? _rootContract; // post-surrogate
39
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
40
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
46
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
47
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
53
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
54
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
60
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
61
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
67
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
68
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
74
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
75
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
81
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
82
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
92
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
93
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
129
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
130
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
183
private
DataContract
RootContract
185
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
186
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
191
_rootContract =
DataContract
.GetDataContract(_rootType);
219
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
220
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
227
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
228
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
235
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
236
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
244
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
245
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
251
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
252
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
258
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
259
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
265
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
266
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
272
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
273
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
280
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
281
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
288
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
289
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
299
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
300
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
306
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
307
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
313
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
314
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
320
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
321
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
327
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
328
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
335
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
336
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
347
if (!
DataContract
.IsValidNCName(jsonName))
399
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
400
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
401
internal static object? ReadJsonValue(
DataContract
contract, XmlReaderDelegator reader, XmlObjectSerializerReadContextComplexJson? context)
411
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
412
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
428
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
429
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
440
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
441
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
461
DataContract
contract = RootContract;
471
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
472
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
478
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
479
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
487
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
488
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
496
DataContract
contract = RootContract;
541
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
542
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
556
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
557
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
574
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
575
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
612
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
613
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
629
internal static void CheckIfTypeIsReference(
DataContract
dataContract)
635
DataContract
.GetClrTypeFullName(dataContract.UnderlyingType),
640
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
641
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
642
internal static
DataContract
GetDataContract(
DataContract
declaredTypeContract, Type declaredType, Type objectType)
644
DataContract
contract = DataContractSerializer.GetDataContract(declaredTypeContract, declaredType, objectType);
System\Runtime\Serialization\Json\JsonByteArrayDataContract.cs (4)
16
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
17
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
23
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
24
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonClassDataContract.cs (13)
18
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
19
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
28
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
29
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
94
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
95
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
104
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
105
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
121
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
122
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
164
throw new SerializationException(SR.Format(SR.JsonDuplicateMemberNames,
DataContract
.GetClrTypeFullName(_traditionalClassDataContract.UnderlyingType), _traditionalClassDataContract.MemberNames[i].Value));
System\Runtime\Serialization\Json\JsonCollectionDataContract.cs (15)
18
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
19
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
28
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
29
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
72
throw new InvalidDataContractException(SR.Format(SR.GetOnlyCollectionMustHaveAddMethod,
DataContract
.GetClrTypeFullName(this.TraditionalDataContract.UnderlyingType)));
96
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
97
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
127
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
128
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
149
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
150
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
166
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
167
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonDataContract.cs (39)
14
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
22
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
23
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
24
protected JsonDataContract(
DataContract
traditionalDataContract)
38
protected
DataContract
TraditionalDataContract => _helper.TraditionalDataContract;
42
public static JsonReadWriteDelegates? GetGeneratedReadWriteDelegates(
DataContract
c)
51
internal static JsonReadWriteDelegates GetReadWriteDelegatesFromGeneratedAssembly(
DataContract
c)
64
internal static JsonReadWriteDelegates? TryGetReadWriteDelegatesFromGeneratedAssembly(
DataContract
c)
70
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
71
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
72
public static JsonDataContract GetJsonDataContract(
DataContract
traditionalDataContract)
77
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
78
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
87
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
88
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
94
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
95
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
103
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
104
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
157
private readonly
DataContract
_traditionalDataContract;
160
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
161
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
162
internal JsonDataContractCriticalHelper(
DataContract
traditionalDataContract)
171
internal
DataContract
TraditionalDataContract => _traditionalDataContract;
175
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
176
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
177
public static JsonDataContract GetJsonDataContract(
DataContract
traditionalDataContract)
214
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
215
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
216
private static JsonDataContract CreateJsonDataContract(int id,
DataContract
traditionalDataContract)
279
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
280
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
285
foreach (KeyValuePair<XmlQualifiedName,
DataContract
> knownDataContract in _traditionalDataContract.KnownDataContracts)
290
DataContract
itemContract = collectionDataContract.ItemContract;
298
DataContract
itemDataContract =
DataContract
.GetDataContract(Globals.TypeOfKeyValuePair.MakeGenericType(collectionDataContract.ItemType.GenericTypeArguments));
317
private static readonly Dictionary<
DataContract
, JsonReadWriteDelegates> s_jsonDelegates = new Dictionary<
DataContract
, JsonReadWriteDelegates>();
319
public static Dictionary<
DataContract
, JsonReadWriteDelegates> GetJsonDelegates()
System\Runtime\Serialization\Json\JsonEnumDataContract.cs (8)
13
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
14
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
23
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
24
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
41
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
42
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (8)
136
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
149
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
162
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
175
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
188
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
299
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
421
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
446
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (52)
30
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
31
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
37
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
38
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
44
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
45
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
62
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
63
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
70
BeginMethod(_ilg, "Read" +
DataContract
.SanitizeTypeName(classContract.XmlName!.Name) + "FromJson", typeof(JsonFormatClassReaderDelegate), memberAccessFlag);
125
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
126
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
136
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
137
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
145
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
154
BeginMethod(_ilg, "Read" +
DataContract
.SanitizeTypeName(collectionContract.XmlName.Name) + "FromJson" + "IsGetOnly", typeof(JsonFormatGetOnlyCollectionReaderDelegate), memberAccessFlag);
158
BeginMethod(_ilg, "Read" +
DataContract
.SanitizeTypeName(collectionContract.XmlName.Name) + "FromJson", typeof(JsonFormatCollectionReaderDelegate), memberAccessFlag);
177
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
198
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
281
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
282
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
307
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
308
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
356
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
357
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
451
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
456
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.SerializationInfo_ConstructorNotFound,
DataContract
.GetClrTypeFullName(classContract.UnderlyingType)));
465
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
466
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
483
_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadIfNullOrRefMethod, _xmlReaderArg, type,
DataContract
.IsTypeSerializable(type));
493
ThrowSerializationException(SR.Format(SR.ValueTypeCannotBeNull,
DataContract
.GetClrTypeFullName(type)));
509
ThrowSerializationException(SR.Format(SR.ValueTypeCannotHaveId,
DataContract
.GetClrTypeFullName(type)));
532
ThrowSerializationException(SR.Format(SR.ValueTypeCannotHaveRef,
DataContract
.GetClrTypeFullName(type)));
557
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
563
_ilg.Load(
DataContract
.GetId(declaredType.TypeHandle));
581
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
582
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
597
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
598
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
724
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
725
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
741
DataContract
keyDataContract = keyValueDataContract.Members![0].MemberTypeContract;
763
DataContract
.GetClrTypeFullName(collectionContract.UnderlyingType),
764
DataContract
.GetClrTypeFullName(keyType)));
818
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
819
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
908
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
909
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
960
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
961
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
984
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
985
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
990
ClassDataContract? keyValuePairContract =
DataContract
.GetDataContract(value.LocalType) as ClassDataContract;
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (29)
28
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
29
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
35
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
36
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
55
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
56
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
63
BeginMethod(_ilg, "Write" +
DataContract
.SanitizeTypeName(classContract.XmlName.Name) + "ToJson", typeof(JsonFormatClassWriterDelegate), memberAccessFlag);
82
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
83
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
90
BeginMethod(_ilg, "Write" +
DataContract
.SanitizeTypeName(collectionContract.XmlName.Name) + "ToJson", typeof(JsonFormatCollectionWriterDelegate), memberAccessFlag);
112
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
125
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
200
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
201
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
230
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
231
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
306
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
307
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
506
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
507
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
554
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
555
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
621
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
622
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
659
_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType,
DataContract
.IsTypeSerializable(memberType));
685
_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType,
DataContract
.IsTypeSerializable(memberType));
712
_ilg.Load(
DataContract
.GetId(memberType.TypeHandle));
717
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
718
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonObjectDataContract.cs (8)
14
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
15
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
16
public JsonObjectDataContract(
DataContract
traditionalDataContract)
21
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
22
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
50
return DataContractJsonSerializer.ReadJsonValue(
DataContract
.GetDataContract(Globals.TypeOfObjectArray), jsonReader, context);
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonQNameDataContract.cs (4)
16
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
17
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
23
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
24
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonStringDataContract.cs (4)
16
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
17
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
23
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
24
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonUriDataContract.cs (4)
11
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
12
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
18
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
19
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\JsonXmlDataContract.cs (8)
11
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
17
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
18
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
24
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
25
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
48
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
49
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
76
foreach (KeyValuePair<XmlQualifiedName,
DataContract
> pair in entry)
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (18)
30
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
31
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
43
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
44
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
50
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
51
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
60
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
61
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
115
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
116
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
124
var
itemContract = XmlObjectSerializerWriteContextComplexJson.GetRevisedItemContract(collectionContract.ItemContract);
128
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
129
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
145
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
146
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
161
DataContract
keyDataContract = keyValueDataContract.Members![0].MemberTypeContract;
182
DataContract
.GetClrTypeFullName(collectionContract.UnderlyingType),
183
DataContract
.GetClrTypeFullName(keyType))
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (9)
22
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
23
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
29
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
30
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
104
DataContract
? itemContract;
142
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
143
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
200
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
201
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (25)
21
internal XmlObjectSerializerReadContextComplexJson(DataContractJsonSerializer serializer,
DataContract
rootTypeDataContract)
32
internal static XmlObjectSerializerReadContextComplexJson CreateContext(DataContractJsonSerializer serializer,
DataContract
rootTypeDataContract)
37
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
38
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
39
protected override object? ReadDataContractValue(
DataContract
dataContract, XmlReaderDelegator reader)
44
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
45
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
262
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
263
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
264
internal override
DataContract
GetDataContract(RuntimeTypeHandle typeHandle, Type? type)
266
DataContract
dataContract = base.GetDataContract(typeHandle, type);
271
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
272
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
273
internal override
DataContract
GetDataContractSkipValidation(int typeId, RuntimeTypeHandle typeHandle, Type? type)
275
DataContract
dataContract = base.GetDataContractSkipValidation(typeId, typeHandle, type);
280
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
281
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
282
internal override
DataContract
GetDataContract(int id, RuntimeTypeHandle typeHandle)
284
DataContract
dataContract = base.GetDataContract(id, typeHandle);
316
SR.Format(SR.JsonDuplicateMemberInInput,
DataContract
.GetClrTypeFullName(obj.GetType()), memberNames[memberIndex]));
337
SR.JsonOneRequiredMemberNotFound,
DataContract
.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString()));
342
SR.JsonRequiredMembersNotFound,
DataContract
.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString()));
351
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
352
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
353
protected override
DataContract
? ResolveDataContractFromRootDataContract(XmlQualifiedName typeQName)
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (57)
22
internal static XmlObjectSerializerWriteContextComplexJson CreateContext(DataContractJsonSerializer serializer,
DataContract
rootTypeDataContract)
27
internal XmlObjectSerializerWriteContextComplexJson(DataContractJsonSerializer serializer,
DataContract
rootTypeDataContract)
96
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
97
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
98
protected override bool WriteTypeInfo(XmlWriterDelegator writer,
DataContract
contract,
DataContract
declaredContract)
138
private static bool RequiresJsonTypeInfo(
DataContract
contract)
148
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
149
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
150
protected override void WriteDataContractValue(
DataContract
dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle declaredTypeHandle)
171
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
172
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
175
DataContract
dataContract;
190
DataContract
declaredTypeContract = (declaredTypeID >= 0)
204
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
205
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
206
private void HandleCollectionAssignedToObject(Type declaredType, ref
DataContract
dataContract, ref object obj, ref bool verifyKnownType)
240
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
241
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
242
internal override void SerializeWithXsiTypeAtTopLevel(
DataContract
dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType)
262
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
263
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
264
private void VerifyType(
DataContract
dataContract, Type declaredType)
275
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize,
DataContract
.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace));
290
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
291
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
312
DataContract
dc = GetDataContract(dataNode.Value.GetType());
320
internal static void VerifyObjectCompatibilityWithInterface(
DataContract
contract, object graph, Type declaredType)
335
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
336
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
342
if (
DataContract
.GetClrTypeFullName(objType) != serInfo.FullTypeName)
344
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ChangingFullTypeNameNotSupported, serInfo.FullTypeName,
DataContract
.GetClrTypeFullName(objType)));
354
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
355
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
356
internal static
DataContract
? GetRevisedItemContract(
DataContract
oldItemContract)
362
return
DataContract
.GetDataContract(oldItemContract.UnderlyingType);
367
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
368
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
369
internal override
DataContract
GetDataContract(RuntimeTypeHandle typeHandle, Type? type)
371
DataContract
dataContract = base.GetDataContract(typeHandle, type);
376
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
377
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
378
internal override
DataContract
GetDataContractSkipValidation(int typeId, RuntimeTypeHandle typeHandle, Type? type)
380
DataContract
dataContract = base.GetDataContractSkipValidation(typeId, typeHandle, type);
385
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
386
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
387
internal override
DataContract
GetDataContract(int id, RuntimeTypeHandle typeHandle)
389
DataContract
dataContract = base.GetDataContract(id, typeHandle);
394
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
395
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
396
protected override
DataContract
? ResolveDataContractFromRootDataContract(XmlQualifiedName typeQName)
401
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
402
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
403
internal static
DataContract
? ResolveJsonDataContractFromRootDataContract(XmlObjectSerializerContext context, XmlQualifiedName typeQName,
DataContract
rootTypeDataContract)
411
DataContract
itemContract;
System\Runtime\Serialization\KnownTypeDataContractResolver.cs (6)
21
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
22
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
38
DataContract
contract =
DataContract
.GetDataContract(type);
53
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
54
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\PrimitiveDataContract.cs (141)
30
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
31
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
34
return
DataContract
.GetBuiltInDataContract(type) as PrimitiveDataContract;
37
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
38
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
41
return
DataContract
.GetBuiltInDataContract(name, ns) as PrimitiveDataContract;
64
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
80
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
97
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
98
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
135
private sealed class PrimitiveDataContractCriticalHelper :
DataContract
.DataContractCriticalHelper
182
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
183
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
189
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
190
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
197
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
198
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
219
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
220
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
226
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
227
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
234
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
235
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
251
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
252
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
258
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
259
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
266
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
267
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
283
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
284
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
290
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
291
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
298
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
299
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
315
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
316
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
322
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
323
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
330
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
331
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
347
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
348
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
354
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
355
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
362
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
363
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
401
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
402
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
408
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
409
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
415
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
416
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
432
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
433
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
439
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
440
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
447
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
448
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
464
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
465
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
471
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
472
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
479
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
480
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
500
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
501
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
507
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
508
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
515
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
516
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
557
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
558
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
564
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
565
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
572
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
573
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
589
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
590
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
596
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
597
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
604
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
605
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
621
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
622
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
628
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
629
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
636
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
637
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
653
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
654
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
660
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
661
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
668
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
669
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
685
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
686
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
692
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
693
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
700
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
701
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
721
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
722
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
728
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
729
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
742
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
743
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
859
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
860
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
866
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
867
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
880
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
881
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
899
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
900
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
906
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
907
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
952
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
953
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
959
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
960
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
967
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
968
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
993
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
994
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1000
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1001
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1008
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1009
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1030
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1031
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1037
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1038
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1051
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1052
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1070
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1071
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1077
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1078
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1091
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1092
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\ReflectionClassWriter.cs (14)
21
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
22
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
44
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
45
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
83
context.WriteNull(xmlWriter, memberType,
DataContract
.IsTypeSerializable(memberType));
98
context.WriteNull(xmlWriter, memberType,
DataContract
.IsTypeSerializable(memberType));
109
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
110
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
118
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
119
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
166
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
167
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
172
context.InternalSerialize(xmlWriter, obj, isDeclaredType, writeXsiType,
DataContract
.GetId(memberType.TypeHandle), memberType.TypeHandle);
176
context.InternalSerializeReference(xmlWriter, obj, isDeclaredType, writeXsiType,
DataContract
.GetId(memberType.TypeHandle), memberType.TypeHandle);
System\Runtime\Serialization\ReflectionReader.cs (46)
33
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
34
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
67
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
68
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
90
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
91
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
97
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
98
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
123
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
124
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
139
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
146
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
147
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
193
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
194
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
197
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
198
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
204
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
205
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
223
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
224
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
247
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
248
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
275
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
276
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
281
string objectId = context.ReadIfNullOrRef(xmlReader, type,
DataContract
.IsTypeSerializable(type));
291
throw new SerializationException(SR.Format(SR.ValueTypeCannotHaveId,
DataContract
.GetClrTypeFullName(type)));
307
throw new SerializationException(SR.Format(SR.ValueTypeCannotHaveRef,
DataContract
.GetClrTypeFullName(type)));
319
throw new SerializationException(SR.Format(SR.ValueTypeCannotBeNull,
DataContract
.GetClrTypeFullName(type)));
330
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
331
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
343
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
344
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
364
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
381
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
382
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
391
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
392
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
395
return context.InternalDeserialize(xmlReader,
DataContract
.GetId(type.TypeHandle), type.TypeHandle, name, ns);
426
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
476
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
477
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
525
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
608
throw new InvalidDataContractException(SR.Format(SR.CollectionMustHaveAddMethod,
DataContract
.GetClrTypeFullName(collectionContract.UnderlyingType)));
624
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
625
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\ReflectionXmlFormatReader.cs (10)
30
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
31
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
42
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
43
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
49
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
50
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
122
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
123
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (8)
19
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
20
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
26
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
27
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
94
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
95
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
135
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
136
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\SchemaExporter.cs (51)
39
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
40
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
47
foreach (KeyValuePair<XmlQualifiedName,
DataContract
> pair in _dataContractSet.Contracts)
49
DataContract
dataContract = pair.Value;
76
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
77
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
78
private void ExportDataContract(
DataContract
dataContract)
104
private XmlSchemaElement ExportTopLevelElement(
DataContract
dataContract, XmlSchema? schema)
117
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
118
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
136
DataContract
memberTypeContract = _dataContractSet.GetMemberTypeDataContract(dataMember);
184
private static void SetElementType(XmlSchemaElement element,
DataContract
dataContract, XmlSchema schema)
248
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
249
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
256
if (
DataContract
.GetBuiltInDataContract(clrType) != null
278
typeName =
DataContract
.GetClrTypeFullName(clrType).Substring(nsLen).Replace('+', '.');
283
genericArgumentCounts =
DataContract
.GetDataContractNameForGenericName(typeName, null);
286
XmlQualifiedName dcqname =
DataContract
.GetXmlName(clrType);
292
dcqname = new XmlQualifiedName(collectionName,
DataContract
.GetCollectionNamespace(dcqname.Namespace));
336
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
337
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
359
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
360
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
402
DataContract
itemContract = _dataContractSet.GetItemTypeDataContract(collectionDataContract);
421
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
422
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
462
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
463
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
503
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
504
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
537
throw new InvalidDataContractException(SR.Format(SR.MissingSchemaType, typeQName,
DataContract
.GetClrTypeFullName(clrType)));
591
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
592
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
601
throw new InvalidDataContractException(SR.Format(SR.InvalidXmlDataContractName,
DataContract
.GetClrTypeFullName(type)));
604
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
605
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
613
xmlName =
DataContract
.GetDefaultXmlName(clrType);
627
throw new InvalidDataContractException(SR.Format(SR.InvalidGetSchemaMethod,
DataContract
.GetClrTypeFullName(clrType)));
628
xmlName =
DataContract
.GetDefaultXmlName(clrType);
634
throw new InvalidDataContractException(SR.Format(SR.MissingGetSchemaMethod,
DataContract
.GetClrTypeFullName(clrType), methodName));
637
throw new InvalidDataContractException(SR.Format(SR.InvalidReturnTypeOnGetSchemaMethod,
DataContract
.GetClrTypeFullName(clrType), methodName,
DataContract
.GetClrTypeFullName(getMethod.ReturnType),
DataContract
.GetClrTypeFullName(Globals.TypeOfXmlQualifiedName), typeof(XmlSchemaType)));
644
throw new InvalidDataContractException(SR.Format(SR.InvalidNonNullReturnValueByIsAny,
DataContract
.GetClrTypeFullName(clrType), methodName));
645
xmlName =
DataContract
.GetDefaultXmlName(clrType);
651
xmlName =
DataContract
.GetDefaultXmlName(clrType);
661
DataContract
.GetDefaultXmlName(
DataContract
.GetClrTypeFullName(clrType), out typeName, out typeNs);
682
throw new InvalidDataContractException(SR.Format(SR.MissingSchemaType, typeName,
DataContract
.GetClrTypeFullName(clrType)));
707
throw new InvalidDataContractException(SR.Format(SR.InvalidReturnSchemaOnGetSchemaMethod,
DataContract
.GetClrTypeFullName(clrType)));
766
typeName = new XmlQualifiedName(name,
DataContract
.GetDefaultXmlNamespace(type));
System\Runtime\Serialization\SchemaImporter.cs (81)
16
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
44
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
45
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
167
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
168
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
183
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
184
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
185
internal static bool IsObjectContract(
DataContract
dataContract)
210
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
211
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
229
DataContract
dataContract = ImportType(knownType);
348
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
349
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
350
private
DataContract
ImportAnonymousGlobalElement(XmlSchemaElement element, XmlQualifiedName typeQName, string? ns)
352
DataContract
contract = ImportAnonymousElement(element, typeQName);
361
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
362
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
363
private
DataContract
ImportAnonymousElement(XmlSchemaElement element, XmlQualifiedName typeQName)
382
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
383
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
384
private
DataContract
ImportType(XmlQualifiedName typeName)
386
DataContract
? dataContract =
DataContract
.GetBuiltInDataContract(typeName.Name, typeName.Namespace);
399
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
400
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
401
private
DataContract
ImportType(XmlSchemaType type)
407
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
408
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
409
private
DataContract
ImportType(XmlSchemaType type, XmlQualifiedName typeName, bool isAnonymous)
411
DataContract
? dataContract = _dataContractSet.GetDataContract(typeName);
522
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
523
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
540
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
541
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
557
DataContract
baseContract = ImportType(restriction.BaseType);
620
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
621
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
622
private
DataContract
? ImportType(XmlQualifiedName typeName, XmlSchemaParticle? rootParticle, XmlSchemaObjectCollection attributes, XmlSchemaAnyAttribute? anyAttribute, XmlQualifiedName? baseTypeName, XmlSchemaAnnotation? annotation)
624
DataContract
? dataContract = null;
651
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
652
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
694
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
695
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
696
private
DataContract
ImportXmlDataType(XmlQualifiedName typeName, XmlSchemaType xsdType, bool isAnonymous)
698
DataContract
? dataContract = _dataContractSet.GetDataContract(typeName);
727
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
728
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
748
return (XmlDataContract?)
DataContract
.GetBuiltInDataContract(Globals.TypeOfXmlElement);
751
return (XmlDataContract?)
DataContract
.GetBuiltInDataContract(Globals.TypeOfXmlNodeArray);
821
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
822
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
897
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
898
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
942
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
943
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
953
DataContract
? memberTypeContract = null;
1047
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1048
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1081
DataContract
? contract = _dataContractSet.GetDataContract(shortName);
1122
GenericInfo genericInfo = new GenericInfo(
DataContract
.GetXmlName(Globals.TypeOfKeyValue), Globals.TypeOfKeyValue.FullName);
1133
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1134
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1140
genericInfo = new GenericInfo(
DataContract
.GetXmlName(Globals.TypeOfNullable), Globals.TypeOfNullable.FullName);
1168
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1169
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1191
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1192
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1222
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1223
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1224
private
DataContract
ImportSimpleTypeRestriction(XmlQualifiedName typeName, XmlSchemaSimpleTypeRestriction restriction)
1226
DataContract
dataContract = null!; // Always assigned by one of the ImportType()s, or exception is thrown.
1238
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1239
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1240
private void ImportDataContractExtension(XmlSchemaType type,
DataContract
dataContract)
1262
private static void ImportGenericInfo(XmlSchemaType type,
DataContract
dataContract)
1292
name =
DataContract
.EncodeLocalName(name);
1330
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1331
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1403
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1404
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1405
private void AddDataContract(
DataContract
dataContract)
System\Runtime\Serialization\ScopedKnownTypes.cs (3)
8
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
35
internal
DataContract
? GetDataContract(XmlQualifiedName qname)
40
DataContract
? dataContract;
System\Runtime\Serialization\SpecialTypeDataContract.cs (1)
23
private sealed class SpecialTypeDataContractCriticalHelper :
DataContract
.DataContractCriticalHelper
System\Runtime\Serialization\XmlDataContract.cs (27)
16
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
28
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
29
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
37
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
38
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
92
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
93
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
123
private sealed class XmlDataContractCriticalHelper :
DataContract
.DataContractCriticalHelper
134
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
135
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
141
throw new InvalidDataContractException(SR.Format(SR.IXmlSerializableCannotHaveDataContract,
DataContract
.GetClrTypeFullName(type)));
143
throw new InvalidDataContractException(SR.Format(SR.IXmlSerializableCannotHaveCollectionDataContract,
DataContract
.GetClrTypeFullName(type)));
171
_topLevelElementName = string.IsNullOrEmpty(elementName) ? Name : dictionary.Add(
DataContract
.EncodeLocalName(elementName));
177
throw new InvalidDataContractException(SR.Format(SR.IsAnyCannotHaveXmlRoot,
DataContract
.GetClrTypeFullName(UnderlyingType!)));
184
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
185
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
194
_knownDataContracts =
DataContract
.ImportKnownTypeAttributes(this.UnderlyingType);
254
throw new InvalidDataContractException(SR.Format(SR.IXmlSerializableMustHaveDefaultConstructor,
DataContract
.GetClrTypeFullName(UnderlyingType)));
269
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
270
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
278
ilg.BeginMethod("Create" +
DataContract
.GetClrTypeFullName(type), typeof(CreateXmlSerializableDelegate), memberAccessFlag);
343
throw new SecurityException(SR.Format(SR.PartialTrustIXmlSerializableTypeNotPublic,
DataContract
.GetClrTypeFullName(UnderlyingType)),
353
throw new SecurityException(SR.Format(SR.PartialTrustIXmlSerialzableNoPublicConstructor,
DataContract
.GetClrTypeFullName(UnderlyingType)),
407
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
408
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
417
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
418
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (24)
122
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
165
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
217
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
218
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
359
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
388
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
403
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
446
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
559
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
644
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
673
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
688
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
703
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
771
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
824
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
839
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
846
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
851
s_writeXmlValueMethod = typeof(
DataContract
).GetMethod("WriteXmlValue", Globals.ScanAllMembers);
861
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
866
s_readXmlValueMethod = typeof(
DataContract
).GetMethod("ReadXmlValue", Globals.ScanAllMembers);
880
s_namespaceProperty = typeof(
DataContract
).GetProperty("Namespace", Globals.ScanAllMembers);
921
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
950
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1053
s_throwInvalidDataContractExceptionMethod = typeof(
DataContract
).GetMethod("ThrowInvalidDataContractException", Globals.ScanAllMembers, new Type[] { typeof(string), typeof(Type) });
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (51)
34
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
35
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
41
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
42
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
48
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
49
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
71
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
72
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
78
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
79
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
163
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
164
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
170
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
171
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
188
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
189
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
195
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
196
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
211
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
253
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
282
_ilg.Call(null, XmlFormatGeneratorStatics.GetUninitializedObjectMethod,
DataContract
.GetIdForInitialization(classContract));
347
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
348
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
373
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
374
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
413
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
414
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
487
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
502
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
503
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
520
_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadIfNullOrRefMethod, _xmlReaderArg, type,
DataContract
.IsTypeSerializable(type));
530
ThrowValidationException(SR.Format(SR.ValueTypeCannotBeNull,
DataContract
.GetClrTypeFullName(type)));
546
ThrowValidationException(SR.Format(SR.ValueTypeCannotHaveId,
DataContract
.GetClrTypeFullName(type)));
569
ThrowValidationException(SR.Format(SR.ValueTypeCannotHaveRef,
DataContract
.GetClrTypeFullName(type)));
594
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
600
_ilg.Load(
DataContract
.GetId(declaredType.TypeHandle));
614
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
615
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
631
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
632
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
773
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
774
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
837
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
838
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
888
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
889
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
911
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
912
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
919
ClassDataContract? keyValuePairContract =
DataContract
.GetDataContract(value.LocalType) as ClassDataContract;
1007
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1010
var type =
DataContract
.GetDataContractForInitialization(id).TypeForInitialization;
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (30)
31
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
32
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
38
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
39
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
65
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
66
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
72
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
73
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
109
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
110
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
116
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
117
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
153
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
233
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
234
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
287
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
288
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
372
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
373
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
539
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
540
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
587
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
588
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
634
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
635
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
672
_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType,
DataContract
.IsTypeSerializable(memberType));
698
_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType,
DataContract
.IsTypeSerializable(memberType));
724
_ilg.Load(
DataContract
.GetId(memberType.TypeHandle));
730
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
731
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\XmlObjectSerializer.cs (77)
15
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
21
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
22
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
24
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
25
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
27
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
28
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
31
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
32
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
42
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
43
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
51
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
52
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
60
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
61
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
69
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
70
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
78
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
79
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
85
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
86
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
92
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
93
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
114
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
115
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
122
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
123
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
131
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
132
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
138
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
139
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
145
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
146
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
152
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
153
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
160
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
161
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
180
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
181
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
202
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
203
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
222
internal static void WriteRootElement(XmlWriterDelegator writer,
DataContract
contract, XmlDictionaryString? name, XmlDictionaryString? ns, bool needsContractNsAtRoot)
240
internal static bool CheckIfNeedsContractNsAtRoot(XmlDictionaryString? name, XmlDictionaryString? ns,
DataContract
contract)
262
internal static bool IsContractDeclared(
DataContract
contract,
DataContract
declaredContract)
268
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
269
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
277
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
278
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
286
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
287
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
293
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
294
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
302
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
303
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
306
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
307
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
315
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
316
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
319
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
320
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
326
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
327
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
333
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
334
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
341
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
342
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
348
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
349
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
368
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
369
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
388
internal static bool IsRootXmlAny(XmlDictionaryString? rootName,
DataContract
contract)
398
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
399
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
400
internal static bool IsRootElement(XmlReaderDelegator reader,
DataContract
contract, XmlDictionaryString? name, XmlDictionaryString? ns)
426
DataContract
objectContract = PrimitiveDataContract.GetPrimitiveDataContract(Globals.TypeOfObject)!;
458
string typeInfo = (type == null) ? string.Empty : SR.Format(SR.ErrorTypeInfo,
DataContract
.GetClrTypeFullName(type));
System\Runtime\Serialization\XmlObjectSerializerContext.cs (57)
13
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
20
protected
DataContract
? rootTypeDataContract;
48
internal XmlObjectSerializerContext(DataContractSerializer serializer,
DataContract
rootTypeDataContract, DataContractResolver? dataContractResolver)
98
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
99
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
100
internal
DataContract
GetDataContract(Type type)
105
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
106
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
107
internal virtual
DataContract
GetDataContract(RuntimeTypeHandle typeHandle, Type? type)
111
return
DataContract
.GetGetOnlyCollectionDataContract(
DataContract
.GetId(typeHandle), typeHandle, type);
115
return
DataContract
.GetDataContract(typeHandle);
119
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
120
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
121
internal virtual
DataContract
GetDataContractSkipValidation(int typeId, RuntimeTypeHandle typeHandle, Type? type)
125
return
DataContract
.GetGetOnlyCollectionDataContractSkipValidation(typeId, typeHandle, type);
129
return
DataContract
.GetDataContractSkipValidation(typeId, typeHandle, type);
133
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
134
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
135
internal virtual
DataContract
GetDataContract(int id, RuntimeTypeHandle typeHandle)
139
return
DataContract
.GetGetOnlyCollectionDataContract(id, typeHandle, null /*type*/);
143
return
DataContract
.GetDataContract(id, typeHandle);
147
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
148
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
155
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
156
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
163
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
164
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
177
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
178
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
179
private
DataContract
? GetDataContractFromSerializerKnownTypes(XmlQualifiedName qname)
184
DataContract
? outDataContract;
188
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
189
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
201
DataContract
.CheckAndAdd(knownType, typesChecked, ref dataContracts);
206
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
207
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
208
internal bool IsKnownType(
DataContract
dataContract, DataContractDictionary? knownDataContracts, Type? declaredType)
226
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
227
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
228
internal bool IsKnownType(
DataContract
dataContract, Type? declaredType)
230
DataContract
? knownContract = ResolveDataContractFromKnownTypes(dataContract.XmlName.Name, dataContract.XmlName.Namespace, null /*memberTypeContract*/, declaredType);
234
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
235
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
238
DataContract
? dataContract = ResolveDataContractFromKnownTypes(typeName);
242
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
243
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
244
private
DataContract
? ResolveDataContractFromKnownTypes(XmlQualifiedName typeName) =>
249
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
250
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
251
protected
DataContract
? ResolveDataContractFromKnownTypes(string typeName, string? typeNs,
DataContract
? memberTypeContract, Type? declaredType)
254
DataContract
? dataContract;
283
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
284
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
285
protected virtual
DataContract
? ResolveDataContractFromRootDataContract(XmlQualifiedName typeQName)
290
DataContract
itemContract = GetDataContract(GetSurrogatedType(collectionContract.ItemType));
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (70)
15
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
60
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NullValueReturnedForGetOnlyCollection,
DataContract
.GetClrTypeFullName(type)));
66
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayExceededSize, arraySize,
DataContract
.GetClrTypeFullName(type)));
69
internal static XmlObjectSerializerReadContext CreateContext(DataContractSerializer serializer,
DataContract
rootTypeDataContract, DataContractResolver? dataContractResolver)
81
internal XmlObjectSerializerReadContext(DataContractSerializer serializer,
DataContract
rootTypeDataContract, DataContractResolver? dataContractResolver)
87
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
88
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
91
DataContract
dataContract = GetDataContract(id, declaredTypeHandle);
95
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
96
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
99
DataContract
dataContract = GetDataContract(declaredType);
103
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
104
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
105
internal virtual object? InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType,
DataContract
? dataContract, string? name, string? ns)
111
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
112
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
121
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ErrorDeserializing, SR.Format(SR.ErrorTypeInfo,
DataContract
.GetClrTypeFullName(declaredType)), SR.Format(SR.XmlStartElementExpected, Globals.RefLocalName)));
138
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
139
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
140
protected object? InternalDeserialize(XmlReaderDelegator reader, string? name, string? ns, Type declaredType, ref
DataContract
dataContract)
157
DataContract
? tempDataContract = ResolveDataContractFromKnownTypes(attributes.XsiTypeName, attributes.XsiTypeNamespace, dataContract, declaredType);
172
DataContract
? factoryDataContract = ResolveDataContractFromKnownTypes(attributes.FactoryTypeName, attributes.FactoryTypeNamespace, dataContract, declaredType);
182
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.FactoryTypeNotISerializable,
DataContract
.GetClrTypeFullName(factoryDataContract.UnderlyingType),
DataContract
.GetClrTypeFullName(dataContract.UnderlyingType)));
219
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
220
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
232
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
233
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
264
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
265
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
278
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
279
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
292
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
293
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
367
string oldType = (oldObj != null) ?
DataContract
.GetClrTypeFullName(oldObj.GetType()) : SR.UnknownNullType;
368
string newType = (newObj != null) ?
DataContract
.GetClrTypeFullName(newObj.GetType()) : SR.UnknownNullType;
378
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
379
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
422
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
423
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
459
DataContract
.GetClrTypeFullName(typeof(T))));
494
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
495
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
502
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
503
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
509
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
510
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
541
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
542
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
588
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
589
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
590
protected virtual
DataContract
? ResolveDataContractFromTypeName()
597
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
598
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
610
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
611
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
656
DataContract
? dataContract = ResolveDataContractFromTypeName();
709
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
710
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
784
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
785
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
805
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
806
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
862
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
863
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
943
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
944
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1085
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
1086
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
1087
protected virtual object? ReadDataContractValue(
DataContract
dataContract, XmlReaderDelegator reader)
System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (20)
17
internal XmlObjectSerializerReadContextComplex(DataContractSerializer serializer,
DataContract
rootTypeDataContract, DataContractResolver? dataContractResolver)
29
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
30
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
39
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
40
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
49
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
50
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
51
internal override object? InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType,
DataContract
? dataContract, string? name, string? ns)
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
61
private object? InternalDeserializeWithSurrogate(XmlReaderDelegator xmlReader, Type declaredType,
DataContract
? surrogateDataContract, string? name, string? ns)
65
DataContract
dataContract = surrogateDataContract ??
69
throw new InvalidDataContractException(SR.Format(SR.SurrogatesWithGetOnlyCollectionsNotSupportedSerDeser,
DataContract
.GetClrTypeFullName(declaredType)));
80
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
81
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
89
if (!
DataContract
.IsTypeSerializable(memberType))
97
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
98
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
107
type =
DataContract
.UnwrapNullableType(type);
112
DataContract
.GetClrTypeFullName(type)));
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (86)
34
internal static XmlObjectSerializerWriteContext CreateContext(DataContractSerializer serializer,
DataContract
rootTypeDataContract, DataContractResolver? dataContractResolver)
41
protected XmlObjectSerializerWriteContext(DataContractSerializer serializer,
DataContract
rootTypeDataContract, DataContractResolver? resolver)
84
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
85
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
93
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
94
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
104
DataContract
contract = GetDataContract(declaredTypeID, declaredTypeHandle);
112
DataContract
dataContract = (declaredTypeID >= 0)
124
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
125
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
126
internal void SerializeWithoutXsiType(
DataContract
dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle declaredTypeHandle)
142
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
143
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
144
internal virtual void SerializeWithXsiTypeAtTopLevel(
DataContract
dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType)
165
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
166
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
170
DataContract
dataContract;
173
dataContract = GetDataContractSkipValidation(
DataContract
.GetId(objectTypeHandle), objectTypeHandle, objectType);
197
DataContract
declaredTypeContract = (declaredTypeID >= 0)
207
internal bool OnHandleIsReference(XmlWriterDelegator xmlWriter,
DataContract
contract, object obj)
230
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
231
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
232
protected void SerializeAndVerifyType(
DataContract
dataContract, XmlWriterDelegator xmlWriter, object obj, bool verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)
245
DataContract
? knownContract = ResolveDataContractFromKnownTypes(dataContract.XmlName.Name, dataContract.XmlName.Namespace, null /*memberTypeContract*/, declaredType);
248
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize,
DataContract
.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace));
261
internal virtual bool WriteClrTypeInfo(XmlWriterDelegator xmlWriter,
DataContract
dataContract)
291
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
292
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
310
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
311
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
329
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
330
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
348
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
349
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
365
internal void HandleGraphAtTopLevel(XmlWriterDelegator writer, object obj,
DataContract
contract)
383
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotSerializeObjectWithCycles,
DataContract
.GetClrTypeFullName(obj.GetType())));
399
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
400
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
407
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
408
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
499
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.UnknownXmlType,
DataContract
.GetClrTypeFullName(obj.GetType())));
513
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
514
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
533
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
534
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
537
if (
DataContract
.GetClrTypeFullName(objType) != serInfo.FullTypeName)
550
DataContract
.GetDefaultXmlName(serInfo.FullTypeName, out typeName, out typeNs);
551
xmlWriter.WriteAttributeQualifiedName(Globals.SerPrefix, DictionaryGlobals.ISerializableFactoryTypeLocalName, DictionaryGlobals.SerializationNamespace,
DataContract
.GetClrTypeString(typeName),
DataContract
.GetClrTypeString(typeNs));
559
XmlDictionaryString name =
DataContract
.GetClrTypeString(
DataContract
.EncodeLocalName(serEntry.Name));
575
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
576
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
577
protected virtual void WriteDataContractValue(
DataContract
dataContract, XmlWriterDelegator xmlWriter, object obj, RuntimeTypeHandle declaredTypeHandle)
587
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
588
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
598
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
599
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
606
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedFalse,
DataContract
.GetClrTypeFullName(DataContractResolver.GetType()),
DataContract
.GetClrTypeFullName(objectType)));
616
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull,
DataContract
.GetClrTypeFullName(DataContractResolver.GetType()),
DataContract
.GetClrTypeFullName(objectType)));
621
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull,
DataContract
.GetClrTypeFullName(DataContractResolver.GetType()),
DataContract
.GetClrTypeFullName(objectType)));
626
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
627
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
628
protected virtual bool WriteTypeInfo(XmlWriterDelegator writer,
DataContract
contract,
DataContract
declaredContract)
656
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
657
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
677
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
678
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
687
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
688
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
697
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
698
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
740
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
741
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
753
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
754
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
772
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
773
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
795
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
796
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
820
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
821
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (22)
24
internal XmlObjectSerializerWriteContextComplex(DataContractSerializer serializer,
DataContract
rootTypeDataContract, DataContractResolver? dataContractResolver)
36
internal override bool WriteClrTypeInfo(XmlWriterDelegator xmlWriter,
DataContract
dataContract)
58
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
59
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
79
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
80
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
100
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
101
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
121
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
122
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
139
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
140
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
178
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
179
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
187
if (!
DataContract
.IsTypeSerializable(memberType))
195
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
196
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
205
type =
DataContract
.UnwrapNullableType(type);
210
DataContract
.GetClrTypeFullName(type)));
219
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
220
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
243
DataContract
contract = GetDataContract(objTypeHandle, objType);
System\Runtime\Serialization\XmlReaderDelegator.cs (1)
213
DataContract
.GetClrTypeFullName(type)));
System\Runtime\Serialization\XmlSerializableWriter.cs (3)
27
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableMissingEndElements, (_obj == null ? string.Empty :
DataContract
.GetClrTypeFullName(_obj.GetType()))));
56
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty :
DataContract
.GetClrTypeFullName(_obj.GetType()))));
64
throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty :
DataContract
.GetClrTypeFullName(_obj.GetType()))));
System\Runtime\Serialization\XmlWriterDelegator.cs (1)
274
return new InvalidDataContractException(SR.Format(SR.InvalidPrimitiveType_Serialization,
DataContract
.GetClrTypeFullName(type)));
System\Runtime\Serialization\XPathQueryGenerator.cs (14)
22
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
23
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
30
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
31
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
37
DataContract
currentContract =
DataContract
.GetDataContract(type);
59
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
60
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
61
private static
DataContract
ProcessDataContract(
DataContract
contract, ExportContext context, MemberInfo memberNode)
70
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
71
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
72
private static
DataContract
ProcessClassDataContract(ClassDataContract contract, ExportContext context, MemberInfo memberNode)
110
public ExportContext(
DataContract
rootContract)
System\Runtime\Serialization\XsdDataContractExporter.cs (35)
102
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
103
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
134
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
135
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
163
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
164
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
187
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
188
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
194
DataContract
dataContract =
DataContract
.GetDataContract(type);
206
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
207
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
213
DataContract
dataContract =
DataContract
.GetDataContract(type);
225
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
226
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
232
DataContract
dataContract =
DataContract
.GetDataContract(type);
244
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
245
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
254
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
255
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
259
if (!type.ContainsGenericParameters &&
DataContract
.IsTypeSerializable(type))
263
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
264
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
270
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
271
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
279
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
280
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
305
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
306
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
343
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
344
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
378
[RequiresDynamicCode(
DataContract
.SerializerAOTWarning)]
379
[RequiresUnreferencedCode(
DataContract
.SerializerTrimmerWarning)]
System.Runtime.Serialization.Schema (67)
System\Runtime\Serialization\Schema\CodeExporter.cs (55)
21
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.
DataContract
>;
51
foreach (KeyValuePair<XmlQualifiedName,
DataContract
> pair in dataContractSet.Contracts)
53
DataContract
dataContract = pair.Value;
211
foreach (KeyValuePair<XmlQualifiedName,
DataContract
> pair in _dataContractSet.Contracts)
213
DataContract
dataContract = pair.Value;
260
private void ExportClassDataContractHierarchy(XmlQualifiedName typeName,
DataContract
classContract, ContractCodeDomInfo contractCodeDomInfo, Dictionary<XmlQualifiedName, object?> contractNamesInHierarchy)
268
DataContract
? baseContract = classContract.BaseContract;
305
internal CodeTypeReference GetCodeTypeReference(
DataContract
dataContract)
336
if (param is
DataContract
paramContract)
360
internal CodeTypeReference GetElementTypeReference(
DataContract
dataContract, bool isElementTypeNullable)
372
get { return
DataContract
.GetXmlName(typeof(List<>)); }
375
private
DataContract
GenericListContract
385
get { return
DataContract
.GetXmlName(typeof(Dictionary<,>)); }
388
private
DataContract
GenericDictionaryContract
394
private ContractCodeDomInfo GetContractCodeDomInfo(
DataContract
dataContract)
408
private void GenerateType(
DataContract
dataContract, ContractCodeDomInfo contractCodeDomInfo)
469
private CodeTypeDeclaration? GetNestedType(
DataContract
dataContract, ContractCodeDomInfo contractCodeDomInfo)
478
DataContract
? containingDataContract = _dataContractSet.GetDataContract(new XmlQualifiedName(containingTypeName, dataContract.XmlName.Namespace));
514
private static CodeTypeDeclaration CreateTypeDeclaration(string typeName,
DataContract
dataContract)
535
private CodeTypeReference? GetReferencedType(
DataContract
dataContract)
541
Type? type = _dataContractSet.GetReferencedType(dataContract.XmlName, dataContract, out
DataContract
? referencedContract, out object[]? parameters, SupportsGenericTypeReference);
597
private CodeTypeReference? GetReferencedCollectionType(
DataContract
? collectionContract)
610
DataContract
itemContract = collectionContract.BaseContract!;
629
private static bool HasDefaultCollectionNames(
DataContract
collectionContract)
634
DataContract
itemContract = collectionContract.BaseContract!;
647
private bool TryGetReferencedDictionaryType(
DataContract
collectionContract, [NotNullWhen(true)] out CodeTypeReference? typeReference)
655
Type? type = _dataContractSet.GetReferencedType(GenericDictionaryName, GenericDictionaryContract, out
DataContract
? _, out object[]? _) ?? typeof(Dictionary<,>);
658
DataContract
? itemContract = collectionContract.BaseContract!.As(DataContractType.ClassDataContract);
681
private bool TryGetReferencedListType(
DataContract
itemContract, bool isItemTypeNullable, out CodeTypeReference? typeReference)
685
Type? type = _dataContractSet.GetReferencedType(GenericListName, GenericListContract, out
DataContract
? _, out object[]? _);
698
private CodeTypeReference? GetSurrogatedTypeReference(
DataContract
dataContract)
711
private Type? GetReferencedTypeOnImport(
DataContract
dataContract)
716
if (
DataContract
.GetBuiltInDataContract(dataContract.XmlName.Name, dataContract.XmlName.Namespace) == null)
778
private void ExportClassDataContract(
DataContract
classDataContract, ContractCodeDomInfo contractCodeDomInfo)
896
internal ICollection<CodeTypeReference>? GetKnownTypeReferences(
DataContract
dataContract)
907
foreach (
DataContract
knownTypeContract in knownTypeContracts)
915
private DataContractDictionary? GetKnownTypeContracts(
DataContract
dataContract)
927
return GetKnownTypeContracts(dataContract, new Dictionary<
DataContract
, object?>());
933
private DataContractDictionary? GetKnownTypeContracts(
DataContract
classDataContract, Dictionary<
DataContract
, object?> handledContracts)
944
DataContract
memberContract = dataMember.MemberTypeContract;
966
private static void AddKnownTypeContracts(
DataContract
classDataContract, DataContractDictionary? knownContracts)
975
foreach (KeyValuePair<XmlQualifiedName,
DataContract
> pair in knownContracts)
983
private void AddKnownTypes(
DataContract
classDataContract, ContractCodeDomInfo contractCodeDomInfo)
987
DataContractDictionary? knownContractDictionary = GetKnownTypeContracts(classDataContract, new Dictionary<
DataContract
, object?>());
991
ICollection<
DataContract
> knownTypeContracts = knownContractDictionary.Values;
992
foreach (
DataContract
knownTypeContract in knownTypeContracts)
1051
private static void ThrowIfReferencedBaseTypeSealed(Type baseType,
DataContract
dataContract)
1058
private void ExportEnumDataContract(
DataContract
enumDataContract, ContractCodeDomInfo contractCodeDomInfo)
1107
private void ExportISerializableDataContract(
DataContract
classDataContract, ContractCodeDomInfo contractCodeDomInfo)
1167
private void GenerateKeyValueType(
DataContract
? keyValueContract)
1189
private void ExportCollectionDataContract(
DataContract
collectionContract, ContractCodeDomInfo contractCodeDomInfo)
1206
DataContract
itemContract = collectionContract.BaseContract!;
1449
private string GetClrNamespace(
DataContract
dataContract, ContractCodeDomInfo contractCodeDomInfo)
1610
internal static bool IsObjectContract(
DataContract
? dataContract)
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (5)
22
internal static DataContractType GetContractType(this
DataContract
dataContract) => dataContract.ContractType switch
32
internal static bool Is(this
DataContract
dataContract, DataContractType dcType)
37
internal static
DataContract
? As(this
DataContract
dataContract, DataContractType dcType)
45
internal static bool IsItemTypeNullable(this
DataContract
collectionDataContract)
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (7)
221
DataContract
dataContract = FindDataContract(typeName);
239
DataContract
dataContract = FindDataContract(typeName);
245
internal
DataContract
FindDataContract(XmlQualifiedName typeName)
250
DataContract
? dataContract =
DataContract
.GetBuiltInDataContract(typeName.Name, typeName.Namespace);
271
DataContract
? dataContract =
DataContract
.GetBuiltInDataContract(typeName.Name, typeName.Namespace);
System.Runtime.Serialization.Xml (1)
artifacts\obj\System.Runtime.Serialization.Xml\Debug\net10.0\System.Runtime.Serialization.Xml.Forwards.cs (1)
4
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.DataContracts.
DataContract
))]