first commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Xml.Serialization;
|
||||
using CRIF.ACTion.Common;
|
||||
|
||||
namespace CRIF.ACTion.Tests
|
||||
{
|
||||
public abstract class BuilderTestBase
|
||||
{
|
||||
protected static string Serialize<T>(T dataToSerialize)
|
||||
{
|
||||
var namespaces = new XmlSerializerNamespaces();
|
||||
namespaces.Add(CrifNamespaces.Common.Prefix, CrifNamespaces.Common.Namespace.NamespaceName);
|
||||
|
||||
var stringwriter = new System.IO.StringWriter();
|
||||
var serializer = new XmlSerializer(typeof(T));
|
||||
serializer.Serialize(stringwriter, dataToSerialize, namespaces);
|
||||
return stringwriter.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user