public void SetMetadataReader(XmlDictionaryReader reader)
 {
     this.hasMetadata    = true;
     this.metadataBuffer = null;
     if (reader != null)
     {
         this.metadataBuffer = new XmlBuffer(0x7fff);
         XmlDictionaryWriter writer = this.metadataBuffer.OpenSection(reader.Quotas);
         writer.WriteStartElement("Dummy", "http://Dummy");
         EndpointAddress.Copy(writer, reader);
         this.metadataBuffer.CloseSection();
         this.metadataBuffer.Close();
     }
 }
Example #2
0
 public void SetMetadataReader(XmlDictionaryReader reader)
 {
     _hasMetadata    = true;
     _metadataBuffer = null;
     if (reader != null)
     {
         _metadataBuffer = new XmlBuffer(short.MaxValue);
         XmlDictionaryWriter writer = _metadataBuffer.OpenSection(reader.Quotas);
         writer.WriteStartElement(EndpointAddress.DummyName, EndpointAddress.DummyNamespace);
         EndpointAddress.Copy(writer, reader);
         _metadataBuffer.CloseSection();
         _metadataBuffer.Close();
     }
 }