internal static void ReadAndSignalDelivery(ExpectedResponse expected, BasicDeliverEventArgs evt) { try { expected.Response = HttpResponsePacket.Deserialize(evt.Body); } catch (Exception ex) { expected.DeserializationException = ex; } //NOTE: The ManualResetEventSlim.Set() method can be called after the object has been disposed //So no worries about the Timeout disposing the object before the response comes in. expected.ReceivedEvent.Set(); }