using System.Collections.Generic;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO.Compression;
public static void Test()
var soapNs = @"http://schemas.xmlsoap.org/soap/envelope/";
var doc = new XmlDocument();
var root = doc.AppendChild(doc.CreateElement("SOAP-ENV", "Envelope", soapNs));
var body = root.AppendChild(doc.CreateElement("SOAP-ENV", "Body", soapNs));
var line1 = body.AppendChild(doc.CreateElement("", "AddressLine1", bodyNs));
line1.Attributes.Append(doc.CreateAttribute("xmlns")).Value = bodyNs;
line1.InnerText = "50 W TOWN ST";
body.AppendChild(doc.CreateElement("", "AddressLine2", bodyNs)).InnerText = "STE 400";
body.AppendChild(doc.CreateElement("", "City", bodyNs)).InnerText = "COLUMBUS";
body.AppendChild(doc.CreateElement("", "State", bodyNs)).InnerText = "OH";
body.AppendChild(doc.CreateElement("", "Zip", bodyNs)).InnerText = "43215";
body.AppendChild(doc.CreateElement("", "Zip4", bodyNs)).InnerText = "";
Console.WriteLine(doc.GetOuterXml());
public static class XmlSerializationHelper
public static string GetOuterXml(this XmlNode node, bool indent = true)
using (var textWriter = new StringWriter())
var settings = new XmlWriterSettings
OmitXmlDeclaration = true,
using (var xmlWriter = XmlWriter.Create(textWriter, settings))
return textWriter.ToString();
public class AssertionFailedException : System.Exception
public AssertionFailedException() : base() { }
public AssertionFailedException(string s) : base(s) { }
public static class Assert
public static void IsTrue(bool value)
public static void IsTrue(bool value, string message)
throw new AssertionFailedException(message ?? "failed");
public static void Main()
Console.WriteLine("Roslyn 2.0 Compiler; Environment version: " + Environment.Version);
Console.WriteLine("Uncaught exception: ");