コード例 #1
0
        internal XmlWriterSettings(XmlQueryDataReader reader)
        {
            this.cdataSections       = new List <XmlQualifiedName>();
            this.Encoding            = System.Text.Encoding.GetEncoding(reader.ReadInt32());
            this.OmitXmlDeclaration  = reader.ReadBoolean();
            this.NewLineHandling     = (System.Xml.NewLineHandling)reader.ReadSByte(0, 2);
            this.NewLineChars        = reader.ReadStringQ();
            this.IndentInternal      = (TriState)reader.ReadSByte(-1, 1);
            this.IndentChars         = reader.ReadStringQ();
            this.NewLineOnAttributes = reader.ReadBoolean();
            this.CloseOutput         = reader.ReadBoolean();
            this.ConformanceLevel    = (System.Xml.ConformanceLevel)reader.ReadSByte(0, 2);
            this.CheckCharacters     = reader.ReadBoolean();
            this.outputMethod        = (XmlOutputMethod)reader.ReadSByte(0, 3);
            int capacity = reader.ReadInt32();

            this.cdataSections = new List <XmlQualifiedName>(capacity);
            for (int i = 0; i < capacity; i++)
            {
                this.cdataSections.Add(new XmlQualifiedName(reader.ReadString(), reader.ReadString()));
            }
            this.mergeCDataSections = reader.ReadBoolean();
            this.mediaType          = reader.ReadStringQ();
            this.docTypeSystem      = reader.ReadStringQ();
            this.docTypePublic      = reader.ReadStringQ();
            this.Standalone         = (XmlStandalone)reader.ReadSByte(0, 2);
            this.autoXmlDecl        = reader.ReadBoolean();
            this.ReadOnly           = reader.ReadBoolean();
        }
コード例 #2
0
 /// <summary>
 /// Deserialize the object from BinaryReader.
 /// </summary>
 public WhitespaceRule(XmlQueryDataReader reader)
 {
     // string localName;
     _localName = reader.ReadStringQ();
     // string namespaceName;
     _namespaceName = reader.ReadStringQ();
     // bool preserveSpace;
     _preserveSpace = reader.ReadBoolean();
 }
コード例 #3
0
        /// <summary>
        /// Deserialize the object from BinaryReader.
        /// </summary>
        internal XmlWriterSettings(XmlQueryDataReader reader)
        {
            // Encoding encoding;
            Encoding = Encoding.GetEncoding(reader.ReadInt32());
            // bool omitXmlDecl;
            OmitXmlDeclaration = reader.ReadBoolean();
            // NewLineHandling newLineHandling;
            NewLineHandling = (NewLineHandling)reader.ReadSByte(0, (sbyte)NewLineHandling.None);
            // string newLineChars;
            NewLineChars = reader.ReadStringQ();
            // TriState indent;
            IndentInternal = (TriState)reader.ReadSByte((sbyte)TriState.Unknown, (sbyte)TriState.True);
            // string indentChars;
            IndentChars = reader.ReadStringQ();
            // bool newLineOnAttributes;
            NewLineOnAttributes = reader.ReadBoolean();
            // bool closeOutput;
            CloseOutput = reader.ReadBoolean();
            // ConformanceLevel conformanceLevel;
            ConformanceLevel = (ConformanceLevel)reader.ReadSByte(0, (sbyte)ConformanceLevel.Document);
            // bool checkCharacters;
            CheckCharacters = reader.ReadBoolean();
            // XmlOutputMethod outputMethod;
            _outputMethod = (XmlOutputMethod)reader.ReadSByte(0, (sbyte)XmlOutputMethod.AutoDetect);
            // List<XmlQualifiedName> cdataSections;
            int length = reader.ReadInt32();

            _cdataSections = new List <XmlQualifiedName>(length);
            for (int idx = 0; idx < length; idx++)
            {
                _cdataSections.Add(new XmlQualifiedName(reader.ReadString(), reader.ReadString()));
            }
            // bool mergeCDataSections;
            _mergeCDataSections = reader.ReadBoolean();
            // string mediaType;
            _mediaType = reader.ReadStringQ();
            // string docTypeSystem;
            _docTypeSystem = reader.ReadStringQ();
            // string docTypePublic;
            _docTypePublic = reader.ReadStringQ();
            // XmlStandalone standalone;
            Standalone = (XmlStandalone)reader.ReadSByte(0, (sbyte)XmlStandalone.No);
            // bool autoXmlDecl;
            _autoXmlDecl = reader.ReadBoolean();
            // bool isReadOnly;
            ReadOnly = reader.ReadBoolean();
        }