1 type derived from XmlObjectSerializerWriteContext
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (1)
20
internal class XmlObjectSerializerWriteContextComplex :
XmlObjectSerializerWriteContext
1 instantiation of XmlObjectSerializerWriteContext
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
38
: new
XmlObjectSerializerWriteContext
(serializer, rootTypeDataContract, dataContractResolver);
93 references to XmlObjectSerializerWriteContext
System.Private.DataContractSerialization (93)
System\Runtime\Serialization\ClassDataContract.cs (1)
383
internal override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
? context)
System\Runtime\Serialization\CollectionDataContract.cs (5)
382
internal void IncrementCollectionCount(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context)
740
private delegate void IncrementCollectionCountDelegate(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context);
744
private static void DummyIncrementCollectionCount(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context) { }
747
internal void IncrementCollectionCount(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context)
1556
internal override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
? context)
System\Runtime\Serialization\DataContract.cs (2)
169
internal virtual void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
? context)
183
internal virtual void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
System\Runtime\Serialization\DataContractSerializer.cs (4)
395
XmlObjectSerializerWriteContext
context =
XmlObjectSerializerWriteContext
.CreateContext(this, contract, dataContractResolver);
406
XmlObjectSerializerWriteContext
? context;
411
context =
XmlObjectSerializerWriteContext
.CreateContext(this, RootContract, dataContractResolver);
System\Runtime\Serialization\EnumDataContract.cs (1)
446
internal override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
? context)
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (2)
202
protected override int ReflectionWriteMembers(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract classContract, ClassDataContract derivedMostClassContract, int childElementIndex, XmlDictionaryString[]? memberNames)
239
XmlObjectSerializerWriteContext
.ThrowRequiredMemberMustBeEmitted(member.Name, classContract.UnderlyingType);
System\Runtime\Serialization\PrimitiveDataContract.cs (46)
72
_helper.XmlFormatWriterMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) })!;
88
_helper.XmlFormatContentWriterMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod(WriteMethodName, Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), UnderlyingType })!;
99
internal override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
? context)
184
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
199
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
221
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
236
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
253
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
268
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
285
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
300
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
317
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
332
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
349
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
364
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
403
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
417
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
434
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
449
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
466
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
481
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
502
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
517
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
559
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
574
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
591
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
606
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
623
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
638
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
655
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
670
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
687
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
702
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
723
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
744
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
861
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
882
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
901
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
954
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
969
internal override void WriteXmlElement(XmlWriterDelegator writer, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
995
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
1010
internal override void WriteXmlElement(XmlWriterDelegator xmlWriter, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
1032
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
1053
internal override void WriteXmlElement(XmlWriterDelegator writer, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
1072
internal override void WriteXmlValue(XmlWriterDelegator writer, object obj,
XmlObjectSerializerWriteContext
? context)
1093
internal override void WriteXmlElement(XmlWriterDelegator writer, object? obj,
XmlObjectSerializerWriteContext
context, XmlDictionaryString name, XmlDictionaryString? ns)
System\Runtime\Serialization\ReflectionClassWriter.cs (7)
23
public void ReflectionWriteClass(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract classContract, XmlDictionaryString[]? memberNames)
46
public static void ReflectionWriteValue(XmlWriterDelegator xmlWriter,
XmlObjectSerializerWriteContext
context, Type type, object? value, bool writeXsiType, PrimitiveDataContract? primitiveContractForParamType)
111
protected abstract int ReflectionWriteMembers(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract classContract, ClassDataContract derivedMostClassContract, int childElementIndex, XmlDictionaryString[]? memberNames);
120
protected static bool ReflectionTryWritePrimitive(XmlWriterDelegator xmlWriter,
XmlObjectSerializerWriteContext
context, object? value, XmlDictionaryString name, XmlDictionaryString? ns, PrimitiveDataContract? primitiveContract)
130
private static void InvokeOnSerializing(object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract classContract)
141
private static void InvokeOnSerialized(object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract classContract)
168
private static void ReflectionInternalSerialize(XmlWriterDelegator xmlWriter,
XmlObjectSerializerWriteContext
context, object obj, bool isDeclaredType, bool writeXsiType, Type memberType, bool isNullableOfT = false)
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (4)
21
public void ReflectionWriteClass(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract classContract)
28
public static void ReflectionWriteCollection(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, CollectionDataContract collectionDataContract)
137
protected override int ReflectionWriteMembers(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract classContract, ClassDataContract derivedMostClassContract, int childElementIndex, XmlDictionaryString[]? emptyStringArray)
173
XmlObjectSerializerWriteContext
.ThrowRequiredMemberMustBeEmitted(member.Name, classContract.UnderlyingType);
System\Runtime\Serialization\XmlDataContract.cs (2)
409
internal override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
? context)
412
XmlObjectSerializerWriteContext
.WriteRootIXmlSerializable(xmlWriter, obj);
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (16)
293
s_storeIsGetOnlyCollectionMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("StoreIsGetOnlyCollection", Globals.ScanAllMembers);
307
s_resetIsGetOnlyCollection = typeof(
XmlObjectSerializerWriteContext
).GetMethod("ResetIsGetOnlyCollection", Globals.ScanAllMembers);
678
s_internalSerializeReferenceMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("InternalSerializeReference", Globals.ScanAllMembers);
693
s_internalSerializeMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("InternalSerialize", Globals.ScanAllMembers);
708
s_writeNullMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("WriteNull", Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), typeof(Type), typeof(bool) });
722
s_incrementArrayCountMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("IncrementArrayCount", Globals.ScanAllMembers);
736
s_incrementCollectionCountMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("IncrementCollectionCount", Globals.ScanAllMembers, new Type[] { typeof(XmlWriterDelegator), typeof(ICollection) });
750
s_incrementCollectionCountGenericMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("IncrementCollectionCountGeneric", Globals.ScanAllMembers);
764
s_getDefaultValueMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod(nameof(
XmlObjectSerializerWriteContext
.GetDefaultValue), Globals.ScanAllMembers);
786
s_getNullableValueMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("GetNullableValue", Globals.ScanAllMembers);
800
s_throwRequiredMemberMustBeEmittedMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("ThrowRequiredMemberMustBeEmitted", Globals.ScanAllMembers);
814
s_getHasValueMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("GetHasValue", Globals.ScanAllMembers);
829
s_writeISerializableMethod = typeof(
XmlObjectSerializerWriteContext
).GetMethod("WriteISerializable", Globals.ScanAllMembers);
840
get => s_writeExtensionDataMethod ??= typeof(
XmlObjectSerializerWriteContext
).GetMethod("WriteExtensionData", Globals.ScanAllMembers)!;
1067
s_serializeReadOnlyTypesProperty = typeof(
XmlObjectSerializerWriteContext
).GetProperty("SerializeReadOnlyTypes", Globals.ScanAllMembers);
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (2)
20
internal delegate void XmlFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, ClassDataContract dataContract);
21
internal delegate void XmlFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj,
XmlObjectSerializerWriteContext
context, CollectionDataContract dataContract);
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
34
internal static
XmlObjectSerializerWriteContext
CreateContext(DataContractSerializer serializer, DataContract rootTypeDataContract, DataContractResolver? dataContractResolver)