Created
November 13, 2016 21:37
-
-
Save rogeralsing/1bcd8f01061135c24eb1f5a0251f18ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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