public static MqChangeImage GetDataFromMessage(byte[] message) { MqChangeImage result = new MqChangeImage(); using (var stream = new MemoryStream(message)) { result = Serializer.Deserialize <MqChangeImage>(stream); } return(result); }
public static byte[] GetMess(MqChangeImage mss) { byte[] msgOut; using (var stream = new MemoryStream()) { Serializer.Serialize(stream, mss); msgOut = stream.ToArray(); } return(msgOut); }