CreateBinaryReader() public static method

public static CreateBinaryReader ( System stream, System quotas ) : System.Xml.XmlDictionaryReader
stream System
quotas System
return System.Xml.XmlDictionaryReader
Esempio n. 1
0
 private void CheckIfEndContentTypeAttribute()
 {
     if (this.contentTypeStream != null)
     {
         this.Writer.WriteEndAttribute();
         this.Writer.WriteEndElement();
         this.Writer.Flush();
         this.contentTypeStream.Position = 0L;
         XmlReader reader = XmlDictionaryReader.CreateBinaryReader(this.contentTypeStream, null, XmlDictionaryReaderQuotas.Max, null, null);
         while (reader.Read())
         {
             if (reader.IsStartElement("Wrapper"))
             {
                 this.contentType = reader.GetAttribute(MtomGlobals.MimeContentTypeLocalName, MtomGlobals.MimeContentTypeNamespace200406);
                 if (this.contentType == null)
                 {
                     this.contentType = reader.GetAttribute(MtomGlobals.MimeContentTypeLocalName, MtomGlobals.MimeContentTypeNamespace200505);
                 }
                 break;
             }
         }
         this.writer            = this.infosetWriter;
         this.infosetWriter     = null;
         this.contentTypeStream = null;
         if (this.contentType != null)
         {
             this.Writer.WriteString(this.contentType);
         }
     }
 }