Ejemplo n.º 1
0
        protected override object SerializeMessage <TMessage, TBuilder>(TMessage message)
        {
            StringWriter    text   = new StringWriter();
            XmlFormatWriter writer = XmlFormatWriter.CreateInstance(text);

            writer.WriteMessage("root", message);
            return(text.ToString());
        }
Ejemplo n.º 2
0
        protected override object SerializeMessage <TMessage, TBuilder>(TMessage message)
        {
            StringWriter text = new StringWriter();
            XmlWriter    xwtr = XmlWriter.Create(text, new XmlWriterSettings {
                Indent = true, IndentChars = "  "
            });

            XmlFormatWriter writer = XmlFormatWriter.CreateInstance(xwtr).SetOptions(XmlWriterOptions.OutputNestedArrays);

            writer.WriteMessage("root", message);
            return(text.ToString());
        }