private XmlDictionaryReader GetComparableReader() { XmlBuffer buffer = new XmlBuffer(0x7fffffff); XmlDictionaryWriter writer = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); ParameterHeader.WriteStartHeader(writer, this, AddressingVersion.WSAddressingAugust2004); ParameterHeader.WriteHeaderContents(writer, this); writer.WriteEndElement(); buffer.CloseSection(); buffer.Close(); return(buffer.GetReader(0)); }
XmlDictionaryReader GetComparableReader() { XmlBuffer buffer = new XmlBuffer(int.MaxValue); XmlDictionaryWriter writer = buffer.OpenSection(XmlDictionaryReaderQuotas.Max); // WSAddressingAugust2004 does not write the IsReferenceParameter attribute, // and that's good for a consistent comparable form ParameterHeader.WriteStartHeader(writer, this, AddressingVersion.WSAddressingAugust2004); ParameterHeader.WriteHeaderContents(writer, this); writer.WriteEndElement(); buffer.CloseSection(); buffer.Close(); return(buffer.GetReader(0)); }