/// <summary>
 /// Serialize a <see cref="RequestResponse"/>.
 /// </summary>
 /// <param name="response">Response to serialize</param>
 /// <param name="version">Serialization protocol version to use</param>
 /// <param name="zkprRequest">The Zookeeper request</param>
 /// <returns>Serialized representation of the given response</returns>
 public byte[] SerializeResponse(RequestResponse response, uint version, IZooKeeperRequest zkprRequest)
 {
     using (var serializer = new ZkprSerializer(version))
     {
         serializer.SerializeResponse(response, zkprRequest);
         return(serializer.GetBytes());
     }
 }
 /// <summary>
 /// Function that serializes the Watcher Response
 /// </summary>
 /// <param name="response">the Watcher Response</param>
 /// <param name="version">Version of the serializer</param>
 /// <returns>A byte array representing the serialized response</returns>
 public byte[] SerializeWatcherResponse(RequestResponse response, uint version)
 {
     using (var serializer = new ZkprSerializer(version))
     {
         serializer.SerializeWatcherResponse(response);
         return(serializer.GetBytes());
     }
 }