public string Serialize(EventArgs eventArgs)
{
Ensure.ArgumentNotNull(eventArgs, "eventArgs");
using (var sw = new StringWriter(CultureInfo.InvariantCulture))
{
var serializer = new XmlSerializer(eventArgs.GetType());
serializer.Serialize(sw, eventArgs);
return sw.ToString();
}
}