System.Xml.Serialization.XmlSerializationWriterInterpreter.WritePrimitiveValueLiteral C# (CSharp) Method

WritePrimitiveValueLiteral() private method

private WritePrimitiveValueLiteral ( object memberValue, string name, string ns, XmlTypeMapping mappedType, TypeData typeData, bool wrapped, bool isNullable ) : void
memberValue object
name string
ns string
mappedType XmlTypeMapping
typeData TypeData
wrapped bool
isNullable bool
return void
		void WritePrimitiveValueLiteral (object memberValue, string name, string ns, XmlTypeMapping mappedType, TypeData typeData, bool wrapped, bool isNullable)
		{
			if (!wrapped) {
				WriteValue (GetStringValue (mappedType, typeData, memberValue));
			}
			else if (isNullable) {
				if (typeData.Type == typeof(XmlQualifiedName)) WriteNullableQualifiedNameLiteral (name, ns, (XmlQualifiedName)memberValue);
				else WriteNullableStringLiteral (name, ns, GetStringValue (mappedType, typeData, memberValue));
			}
			else {
				if (typeData.Type == typeof(XmlQualifiedName)) WriteElementQualifiedName (name, ns, (XmlQualifiedName)memberValue);
				else WriteElementString (name, ns, GetStringValue (mappedType, typeData, memberValue));
			}
		}