System.Xml.Serialization.ReflectionXmlSerializationWriter.ReflectionXmlSerializationWriter C# (CSharp) Method

ReflectionXmlSerializationWriter() public method

public ReflectionXmlSerializationWriter ( XmlMapping xmlMapping, XmlWriter xmlWriter, XmlSerializerNamespaces namespaces, string encodingStyle, string id ) : System
xmlMapping XmlMapping
xmlWriter XmlWriter
namespaces XmlSerializerNamespaces
encodingStyle string
id string
return System
        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)));
            }
        }