Skip to content

Instantly share code, notes, and snippets.

@rogeralsing
Created Nov 13, 2016
Embed
What would you like to do?
private void SerializeZeroFormatter()
{
try
{
var s = new MemoryStream();
ZeroFormatterSerializer.Serialize(s, Value);
var bytes = s.ToArray();
RunTest("Zero Formatter", () =>
{
var stream = new MemoryStream();
ZeroFormatterSerializer.Serialize(stream, Value);
}, () =>
{
s.Position = 0;
var o = ZeroFormatterSerializer.Deserialize<T>(s);
}, bytes.Length);
}
catch(Exception x)
{
//ZF cannot handle most types in the testkit
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment