168 references to XmlFormatGeneratorStatics
System.Private.DataContractSerialization (168)
System\Runtime\Serialization\ClassDataContract.cs (1)
1084_extensionDataSetMethod = XmlFormatGeneratorStatics.ExtensionDataSetExplicitMethodInfo;
System\Runtime\Serialization\CollectionDataContract.cs (1)
867getCurrentMethod = XmlFormatGeneratorStatics.GetCurrentMethod;
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (37)
85_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, _objectLocal); 108_ilg.Call(XmlFormatGeneratorStatics.GetDateTimeOffsetMethod); 114_ilg.Call(XmlFormatGeneratorStatics.GetMemoryStreamMethod); 241_ilg.LoadMember(XmlFormatGeneratorStatics.GetStreamingContextMethod); 255_ilg.LoadMember(XmlFormatGeneratorStatics.GetStreamingContextMethod); 277_ilg.Call(XmlFormatGeneratorStatics.GetRealObjectMethod); 316_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, memberCount); 328_ilg.Call(null, XmlFormatGeneratorStatics.MoveToNextElementMethod, _xmlReaderArg); 383_ilg.Call(_contextArg, XmlFormatGeneratorStatics.StoreCollectionMemberInfoMethod, value); 388_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ResetCollectionMemberInfoMethod); 463_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadSerializationInfoMethod, _xmlReaderArg, classContract.UnderlyingType); 465_ilg.LoadMember(XmlFormatGeneratorStatics.GetStreamingContextMethod); 486_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadAttributesMethod, _xmlReaderArg); 487_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadIfNullOrRefMethod, _xmlReaderArg, type, DataContract.IsTypeSerializable(type)); 508_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetObjectIdMethod); 527_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, value); 539_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetExistingObjectMethod, objectId, type, name, string.Empty); 572_ilg.Call(XmlFormatGeneratorStatics.InternalDeserializeMethod); 645_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, _objectLocal); 663_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetObjectIdMethod); 685_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, 1); 690MethodInfo ensureArraySizeMethod = XmlFormatGeneratorStatics.EnsureArraySizeMethod.MakeGenericMethod(itemType); 709MethodInfo trimArraySizeMethod = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType); 712_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectWithIdMethod, objectId, _objectLocal); 718_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectWithIdMethod, objectId, _objectLocal); 787_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, 1); 833_ilg.LoadMember(XmlFormatGeneratorStatics.GetCollectionMemberMethod); 848_ilg.Call(null, XmlFormatGeneratorStatics.ThrowNullValueReturnedForGetOnlyCollectionExceptionMethod, type); 854_ilg.Call(_contextArg, XmlFormatGeneratorStatics.CheckEndOfArrayMethod, _xmlReaderArg, size, _memberNamesArg, _emptyDictionaryStringArg); 866_ilg.Call(null, XmlFormatGeneratorStatics.ThrowNullValueReturnedForGetOnlyCollectionExceptionMethod, type); 873_ilg.Call(XmlFormatGeneratorStatics.GetArrayLengthMethod); 881_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, 1); 886_ilg.Call(null, XmlFormatGeneratorStatics.ThrowArrayExceededSizeExceptionMethod, size, type); 902_ilg.Call(_contextArg, XmlFormatGeneratorStatics.CheckEndOfArrayMethod, _xmlReaderArg, size, _memberNamesArg, _emptyDictionaryStringArg); 970_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ResetAttributesMethod); 1035_ilg.Call(_contextArg, XmlFormatGeneratorStatics.SkipUnknownElementMethod, _xmlReaderArg); 1062_ilg.Call(null, XmlFormatGeneratorStatics.CreateUnexpectedStateExceptionMethod, expectedState, _xmlReaderArg);
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (25)
143_ilg.Call(XmlFormatGeneratorStatics.GetDateTimeOffsetAdapterMethod); 148_ilg.Call(XmlFormatGeneratorStatics.GetMemoryStreamAdapterMethod); 159ThrowIfCannotSerializeReadOnlyTypes(XmlFormatGeneratorStatics.CollectionSerializationExceptionMessageProperty); 165_ilg.LoadMember(XmlFormatGeneratorStatics.SerializeReadOnlyTypesProperty); 170_ilg.Call(XmlFormatGeneratorStatics.ThrowInvalidDataContractExceptionMethod); 182_ilg.Call(XmlFormatGeneratorStatics.GetStreamingContextMethod); 195_ilg.Call(XmlFormatGeneratorStatics.GetStreamingContextMethod); 218_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteExtensionDataMethod, _xmlWriterArg, extensionDataLocal, -1); 238_ilg.Call(thisObj: _contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, classMemberCount); 248XmlFormatGeneratorStatics.StoreIsGetOnlyCollectionMethod : 249XmlFormatGeneratorStatics.ResetIsGetOnlyCollectionMethod); 278_ilg.Call(thisObj: _contextArg, XmlFormatGeneratorStatics.WriteExtensionDataMethod, _xmlWriterArg, extensionDataLocal, memberCount); 286_ilg.Call(thisObj: null, XmlFormatGeneratorStatics.ThrowRequiredMemberMustBeEmittedMethod, member.Name, classContract.UnderlyingType); 319_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementArrayCountMethod, _xmlWriterArg, _objectLocal); 347incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountMethod; 351incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(collectionContract.ItemType); 354incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(typeof(System.Collections.Generic.KeyValuePair<,>).MakeGenericType(collectionContract.ItemType.GetGenericArguments())); 472_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, 1); 643InternalSerialize(XmlFormatGeneratorStatics.InternalSerializeMethod, memberValue, memberType, false /* writeXsiType */); 659_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType, DataContract.IsTypeSerializable(memberType)); 685_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType, DataContract.IsTypeSerializable(memberType)); 688InternalSerialize((isNullableOfT ? XmlFormatGeneratorStatics.InternalSerializeMethod : XmlFormatGeneratorStatics.InternalSerializeReferenceMethod), 705_ilg.Call(memberValue, XmlFormatGeneratorStatics.GetTypeMethod); 706_ilg.Call(XmlFormatGeneratorStatics.GetTypeHandleMethod);
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (1)
231object? defaultValue = XmlFormatGeneratorStatics.GetDefaultValue(memberType);
System\Runtime\Serialization\ReflectionReader.cs (1)
186MethodInfo trimArraySizeMethod = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType);
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (1)
165object? defaultValue = XmlFormatGeneratorStatics.GetDefaultValue(memberType);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (54)
108_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, _objectLocal); 114_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetObjectIdMethod); 130_ilg.Call(_objectLocal, XmlFormatGeneratorStatics.OnDeserializationMethod, null); 145_ilg.Call(XmlFormatGeneratorStatics.GetDateTimeOffsetMethod); 151_ilg.Call(XmlFormatGeneratorStatics.GetMemoryStreamMethod); 282_ilg.Call(null, XmlFormatGeneratorStatics.GetUninitializedObjectMethod, DataContract.GetIdForInitialization(classContract)); 302_ilg.LoadMember(XmlFormatGeneratorStatics.GetStreamingContextMethod); 319_ilg.LoadMember(XmlFormatGeneratorStatics.GetStreamingContextMethod); 343_ilg.Call(XmlFormatGeneratorStatics.GetRealObjectMethod); 358_ilg.New(XmlFormatGeneratorStatics.ExtensionDataObjectCtor); 382_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, memberCount); 392_ilg.Call(null, XmlFormatGeneratorStatics.MoveToNextElementMethod, _xmlReaderArg); 395_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetMemberIndexWithRequiredMembersMethod, _xmlReaderArg, _memberNamesArg, _memberNamespacesArg, memberIndexLocal, requiredIndexLocal, extensionDataLocal); 397_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetMemberIndexMethod, _xmlReaderArg, _memberNamesArg, _memberNamespacesArg, memberIndexLocal, extensionDataLocal); 412_ilg.Call(null, XmlFormatGeneratorStatics.ThrowRequiredMemberMissingExceptionMethod, _xmlReaderArg, memberIndexLocal, requiredIndexLocal, _memberNamesArg); 449_ilg.Call(_contextArg, XmlFormatGeneratorStatics.StoreCollectionMemberInfoMethod, value); 454_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ResetCollectionMemberInfoMethod); 500_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadSerializationInfoMethod, _xmlReaderArg, classContract.UnderlyingType); 502_ilg.LoadMember(XmlFormatGeneratorStatics.GetStreamingContextMethod); 523_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadAttributesMethod, _xmlReaderArg); 524_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ReadIfNullOrRefMethod, _xmlReaderArg, type, DataContract.IsTypeSerializable(type)); 545_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetObjectIdMethod); 564_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, value); 576_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetExistingObjectMethod, objectId, type, name, ns); 608_ilg.Call(XmlFormatGeneratorStatics.InternalDeserializeMethod); 611_ilg.Call(XmlFormatGeneratorStatics.UnboxPointer); 655constructor = XmlFormatGeneratorStatics.DictionaryCtor; 683_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, _objectLocal); 688_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetArraySizeMethod); 692_ilg.Call(_contextArg, XmlFormatGeneratorStatics.GetObjectIdMethod); 715_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, 1); 720MethodInfo ensureArraySizeMethod = XmlFormatGeneratorStatics.EnsureArraySizeMethod.MakeGenericMethod(itemType); 739MethodInfo trimArraySizeMethod = XmlFormatGeneratorStatics.TrimArraySizeMethod.MakeGenericMethod(itemType); 742_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectWithIdMethod, objectId, _objectLocal); 746_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, size); 751_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, _objectLocal); 766_ilg.Call(_contextArg, XmlFormatGeneratorStatics.CheckEndOfArrayMethod, _xmlReaderArg, size, _memberNamesArg, _memberNamespacesArg); 772_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectWithIdMethod, objectId, _objectLocal); 789_ilg.LoadMember(XmlFormatGeneratorStatics.GetCollectionMemberMethod); 797_ilg.Call(null, XmlFormatGeneratorStatics.ThrowNullValueReturnedForGetOnlyCollectionExceptionMethod, type); 804_ilg.Call(XmlFormatGeneratorStatics.GetArrayLengthMethod); 808_ilg.Call(_contextArg, XmlFormatGeneratorStatics.AddNewObjectMethod, _objectLocal); 814_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, 1); 819_ilg.Call(null, XmlFormatGeneratorStatics.ThrowArrayExceededSizeExceptionMethod, size, type); 835_ilg.Call(_contextArg, XmlFormatGeneratorStatics.CheckEndOfArrayMethod, _xmlReaderArg, size, _memberNamesArg, _memberNamespacesArg); 898_ilg.Call(_contextArg, XmlFormatGeneratorStatics.ResetAttributesMethod); 901_ilg.Call(XmlFormatGeneratorStatics.GetItemContractMethod); 904_ilg.Call(XmlFormatGeneratorStatics.ReadXmlValueMethod); 955_ilg.Call(_contextArg, XmlFormatGeneratorStatics.SkipUnknownElementMethod, _xmlReaderArg); 964_ilg.Call(_xmlReaderArg, XmlFormatGeneratorStatics.IsStartElementMethod2, nameArg, nsArg); 969_ilg.Call(_xmlReaderArg, XmlFormatGeneratorStatics.IsStartElementMethod0); 975_ilg.LoadMember(XmlFormatGeneratorStatics.NodeTypeProperty); 982_ilg.Call(null, XmlFormatGeneratorStatics.CreateUnexpectedStateExceptionMethod, expectedState, _xmlReaderArg); 994_ilg.New(XmlFormatGeneratorStatics.SerializationExceptionCtor);
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (47)
171_ilg.Call(XmlFormatGeneratorStatics.GetDateTimeOffsetAdapterMethod); 176_ilg.Call(XmlFormatGeneratorStatics.GetMemoryStreamAdapterMethod); 187ThrowIfCannotSerializeReadOnlyTypes(XmlFormatGeneratorStatics.ClassSerializationExceptionMessageProperty); 192ThrowIfCannotSerializeReadOnlyTypes(XmlFormatGeneratorStatics.CollectionSerializationExceptionMessageProperty); 198_ilg.LoadMember(XmlFormatGeneratorStatics.SerializeReadOnlyTypesProperty); 203_ilg.Call(XmlFormatGeneratorStatics.ThrowInvalidDataContractExceptionMethod); 215_ilg.Call(XmlFormatGeneratorStatics.GetStreamingContextMethod); 228_ilg.Call(XmlFormatGeneratorStatics.GetStreamingContextMethod); 241_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteISerializableMethod, _xmlWriterArg, _objectLocal); 249_ilg.LoadMember(XmlFormatGeneratorStatics.ContractNamespacesField); 255_ilg.LoadMember(XmlFormatGeneratorStatics.MemberNamesField); 264_ilg.LoadMember(XmlFormatGeneratorStatics.ChildElementNamespacesProperty); 274_ilg.LoadMember(XmlFormatGeneratorStatics.ExtensionDataProperty); 276_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteExtensionDataMethod, _xmlWriterArg, extensionDataLocal, -1); 298_ilg.LoadMember(XmlFormatGeneratorStatics.NamespaceProperty); 308_ilg.Call(thisObj: _contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, classMemberCount); 318XmlFormatGeneratorStatics.StoreIsGetOnlyCollectionMethod : 319XmlFormatGeneratorStatics.ResetIsGetOnlyCollectionMethod); 334_ilg.Call(methodInfo: XmlFormatGeneratorStatics.WriteNamespaceDeclMethod); 344_ilg.Call(thisObj: _contextArg, XmlFormatGeneratorStatics.WriteExtensionDataMethod, _xmlWriterArg, extensionDataLocal, memberCount); 352_ilg.Call(thisObj: null, XmlFormatGeneratorStatics.ThrowRequiredMemberMustBeEmittedMethod, member.Name, classContract.UnderlyingType); 378_ilg.LoadMember(XmlFormatGeneratorStatics.NamespaceProperty); 383_ilg.LoadMember(XmlFormatGeneratorStatics.CollectionItemNameProperty); 390_ilg.LoadMember(XmlFormatGeneratorStatics.ChildElementNamespaceProperty); 391_ilg.Call(XmlFormatGeneratorStatics.WriteNamespaceDeclMethod); 399_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementArrayCountMethod, _xmlWriterArg, _objectLocal); 426incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountMethod; 430incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(collectionContract.ItemType); 433incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(typeof(System.Collections.Generic.KeyValuePair<,>).MakeGenericType(collectionContract.ItemType.GetGenericArguments())); 466moveNextMethod ??= XmlFormatGeneratorStatics.MoveNextMethod; 467getCurrentMethod ??= XmlFormatGeneratorStatics.GetCurrentMethod; 500_ilg.New(XmlFormatGeneratorStatics.DictionaryEnumeratorCtor); 514_ilg.Call(_contextArg, XmlFormatGeneratorStatics.IncrementItemCountMethod, 1); 522_ilg.Call(_dataContractArg, XmlFormatGeneratorStatics.GetItemContractMethod); 527_ilg.Call(XmlFormatGeneratorStatics.WriteXmlValueMethod); 643_ilg.Call(XmlFormatGeneratorStatics.BoxPointer); 656InternalSerialize(XmlFormatGeneratorStatics.InternalSerializeMethod, memberValue, memberType, writeXsiType); 672_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType, DataContract.IsTypeSerializable(memberType)); 698_ilg.Call(_contextArg, XmlFormatGeneratorStatics.WriteNullMethod, _xmlWriterArg, memberType, DataContract.IsTypeSerializable(memberType)); 701InternalSerialize((isNullableOfT ? XmlFormatGeneratorStatics.InternalSerializeMethod : XmlFormatGeneratorStatics.InternalSerializeReferenceMethod), 742_ilg.Call(XmlFormatGeneratorStatics.GetHasValueMethod.MakeGenericMethod(innerType)); 744_ilg.Call(XmlFormatGeneratorStatics.GetNullableValueMethod.MakeGenericMethod(innerType)); 753_ilg.Call(XmlFormatGeneratorStatics.GetDefaultValueMethod.MakeGenericMethod(memberType)); 782_ilg.Call(needsPrefix ? XmlFormatGeneratorStatics.WriteStartElementMethod3 : XmlFormatGeneratorStatics.WriteStartElementMethod2); 787_ilg.Call(_xmlWriterArg, XmlFormatGeneratorStatics.WriteEndElementMethod);