99 if (!
mapping.TypeDesc.IsValueType && !
mapping.TypeDesc.Type.IsPrimitive)
126 if ((elements.Length != 0 ||
text !=
null) && (!
arrayTypeDesc.IsNullable ||
o !=
null))
141 for (
int i = 0; i <
list.Count; i++)
163 if (elements.Length == 0 &&
text ==
null)
167 if (elements.Length == 1 &&
text ==
null)
232 else if (
text !=
null)
236 else if (elements.Length != 0 &&
o !=
null)
323 foreach (
object item in enumerable)
344 base.Writer.WriteStartElement(
text, ns);
428 void Wrapper(
object o)
494 if (
mapping.TypeDesc.IsAbstract)
598 base.Writer.WriteStartElement(
n, ns);
601 base.Writer.WriteEndElement();
606 base.Writer.WriteStartElement(
n, ns);
609 base.Writer.WriteEndElement();
669 return propertyInfo.GetValue(
o);
722 base.Writer.WriteString(
" ");
724 if (current
is byte[])
752 base.Writer.WriteEndAttribute();
795 for (
int i = 0; i <
members.Length; i++)
835 if (
o.ToString() ==
text)
954 if (
o is byte[] &&
typeDesc.FormatterName ==
"ByteArrayHex")
961 if (
typeDesc.FormatterName ==
"DateTime")
966 if (
typeDesc.FormatterName ==
"Date")
971 if (
typeDesc.FormatterName ==
"Time")
1005 if (
o is char &&
typeDesc.FormatterName ==
"Char")
1055 object[]
array = (
object[])
o;
1056 int num =
array.Length;
1090 if (num > i && (!
flag2.HasValue ||
flag2.Value))
void Add(TKey key, TValue value)
static long ToInt64(object? value)
static readonly DBNull Value
static byte Min(byte val1, byte val2)
static string XmlInternalError
static string Format(string resourceFormat, object p1)
static string XmlInternalErrorDetails
static MemberInfo GetEffectiveGetInfo(Type declaringType, string memberName)
static TypeDesc QnameTypeDesc
static TypeDesc StringTypeDesc
void WriteArrayItems(ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc, object o)
bool WritePrimitiveValue(TypeDesc typeDesc, object o, bool isElement, out string stringValue)
ReflectionXmlSerializationWriter(XmlMapping xmlMapping, XmlWriter xmlWriter, XmlSerializerNamespaces namespaces, string encodingStyle, string id)
bool CanOptimizeWriteListSequence(TypeDesc listElementTypeDesc)
string ConvertPrimitiveToString(object o, TypeDesc typeDesc)
object GetMemberValue(object o, MemberInfo memberInfo)
void WriteObjectOfTypeElement(object o, XmlTypeMapping mapping)
void WriteArray(object o, object choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc)
void GenerateMembersElement(object o, XmlMembersMapping xmlMembersMapping)
bool hasRequirement(WritePrimitiveMethodRequirement value, WritePrimitiveMethodRequirement requirement)
void WriteStructMethod(StructMapping mapping, string n, string ns, object o, bool isNullable, bool needType)
void WriteObject(object o)
int FindXmlnsIndex(MemberMapping[] members)
void WritePrimitive(WritePrimitiveMethodRequirement method, string name, string ns, object defaultValue, object o, TypeMapping mapping, bool writeXsiType, bool isElement, bool isNullable)
void WriteElement(object o, ElementAccessor element, bool writeAccessor)
void WriteAttribute(object memberValue, AttributeAccessor attribute, object container)
void WriteQualifiedNameElement(string name, string ns, object defaultValue, XmlQualifiedName o, bool nullable, bool isSoap, PrimitiveMapping mapping)
override void InitCallbacks()
void WriteText(object o, TextAccessor text)
string WriteEnumMethod(EnumMapping mapping, object v)
bool WriteEnumAndArrayTypes(StructMapping structMapping, object o, string n, string ns)
XmlSerializationWriteCallback CreateXmlSerializationWriteCallback(TypeMapping mapping, string name, string ns, bool isNullable)
readonly XmlMapping _mapping
void GenerateTypeElement(object o, XmlTypeMapping xmlMapping)
void WriteMember(object memberValue, AttributeAccessor attribute, TypeDesc memberTypeDesc, object container)
object GetMemberValue(object o, string memberName)
bool IsDefaultValue(TypeMapping mapping, object o, object value, bool isNullable)
bool WriteDerivedTypes(StructMapping mapping, string n, string ns, object o, bool isNullable)
WritePrimitiveMethodRequirement
@ WriteNullableStringLiteral
void WriteMember(object o, object choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc memberTypeDesc, bool writeAccessors)
void WriteElements(object o, object enumSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, bool writeAccessors, bool isNullable)
static MemberMapping[] GetAllMembers(StructMapping mapping)
static ? string FromXmlNCName(string? ncName)
void WriteValue(string? value)
void WriteXmlAttribute(XmlNode node)
void Init(XmlWriter w, XmlSerializerNamespaces namespaces, string encodingStyle, string idBase, TempAssembly tempAssembly)
void WriteElementQualifiedName(string localName, XmlQualifiedName? value)
void WriteNullableQualifiedNameEncoded(string name, string? ns, XmlQualifiedName? value, XmlQualifiedName? xsiType)
void WriteEmptyTag(string? name)
static byte[] FromByteArrayBase64(byte[] value)
void WritePotentiallyReferencingElement(string? n, string? ns, object? o)
void WriteRpcResult(string name, string? ns)
void WriteNullTagEncoded(string? name)
void WriteNamespaceDeclarations(XmlSerializerNamespaces? xmlns)
void WriteNullableStringEncoded(string name, string? ns, string? value, XmlQualifiedName? xsiType)
Exception CreateInvalidAnyTypeException(object o)
static ? string FromXmlNmTokens(string? nmTokens)
static ? string FromXmlName(string? name)
static string FromDateTime(DateTime value)
void WriteXsiType(string name, string? ns)
Exception CreateInvalidEnumValueException(object value, string typeName)
void WriteTypedPrimitive(string? name, string? ns, object o, bool xsiType)
void WriteNullableStringLiteralRaw(string name, string? ns, string? value)
static ? string FromXmlNmToken(string? nmToken)
static string FromEnum(long value, string[] values, long[] ids)
void WriteStartDocument()
void AddWriteCallback(Type type, string typeName, string? typeNs, XmlSerializationWriteCallback callback)
Exception CreateInvalidChoiceIdentifierValueException(string type, string identifier)
void WriteNullableQualifiedNameLiteral(string name, string? ns, XmlQualifiedName? value)
void WriteElementStringRaw(string localName, string? value)
void WriteNullTagLiteral(string? name)
void WriteStartElement(string name)
static string FromDate(DateTime value)
Exception CreateUnknownAnyElementException(string name, string ns)
static string FromTime(DateTime value)
void WriteNullableStringEncodedRaw(string name, string? ns, string? value, XmlQualifiedName? xsiType)
string? FromXmlQualifiedName(XmlQualifiedName? xmlQualifiedName)
Exception CreateChoiceIdentifierValueException(string value, string identifier, string name, string ns)
Exception CreateUnknownTypeException(object o)
static string FromChar(char value)
void WriteReferencedElements()
void WriteSerializable(IXmlSerializable? serializable, string name, string ns, bool isNullable)
static ? string FromByteArrayHex(byte[]? value)
void WriteElementLiteral(XmlNode? node, string name, string? ns, bool isNullable, bool any)
static string ToString(bool value)