private MemoryStream PrepareMsgPack(BeerListSerializeBenchmark serializer) { var memoryStream = new MemoryStream(); serializer.MsgPackSerialize(memoryStream); return(memoryStream); }
private MemoryStream PrepareJson(BeerListSerializeBenchmark serializer) { var memoryStream = new MemoryStream(); serializer.JsonSerialize(memoryStream); return(memoryStream); }
public BeerListDeserializeBenchmark() { var serializer = new BeerListSerializeBenchmark(); _json = PrepareJson(serializer); _msgPack = PrepareMsgPack(serializer); _msgPackArray = _msgPack.ToArray(); }
public BeerSkipList() { var serialize = new BeerListSerializeBenchmark(); _inputStream = PrepareMsgPack(serialize); _inputBytes = _inputStream.ToArray(); _unpacker = Unpacker.Create(_inputStream); _msgPackContext = new MsgPackContext(); _msgPackContext.RegisterConverter(new SkipConverter <Beer>()); }