private static void Main() { Func<string, Action<Stream, object>, Func<Stream, object>, Tuple<string, Action<Stream, object>, Func<Stream, object>>> serializer = Tuple.Create; var binaryFormatter = new BinaryFormatter(); var protoFormatter = new ProtoFormatter(); TestSerializers( serializer("BinaryFormatter", binaryFormatter.Serialize, binaryFormatter.Deserialize), serializer("protobuf-net v2", protoFormatter.Serialize, protoFormatter.Deserialize)); }
private static void Main() { Func <string, Action <Stream, object>, Func <Stream, object>, Tuple <string, Action <Stream, object>, Func <Stream, object> > > serializer = Tuple.Create; var binaryFormatter = new BinaryFormatter(); var protoFormatter = new ProtoFormatter(); TestSerializers( serializer("BinaryFormatter", binaryFormatter.Serialize, binaryFormatter.Deserialize), serializer("protobuf-net v2", protoFormatter.Serialize, protoFormatter.Deserialize)); }