public ReflectionXmlSerializationWriter(XmlMapping xmlMapping, XmlWriter xmlWriter, XmlSerializerNamespaces namespaces, string encodingStyle, string id)
{
Init(xmlWriter, namespaces, encodingStyle, id, null);
if (!xmlMapping.IsWriteable || !xmlMapping.GenerateSerializer)
{
throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping)));
}
if (xmlMapping is XmlTypeMapping || xmlMapping is XmlMembersMapping)
{
_mapping = xmlMapping;
}
else
{
throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping)));
}
}