Last active
December 10, 2015 21:48
-
-
Save timsavery/4497238 to your computer and use it in GitHub Desktop.
The Message Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Message { | |
private readonly IModel _model; | |
private readonly dynamic _body; | |
private readonly ulong _deliveryTag; | |
public dynamic Body { | |
get { return this._body; } | |
} | |
internal Message(IModel model, ulong deliveryTag, dynamic body) { | |
this._body = body; | |
this._model = model; | |
this._deliveryTag = deliveryTag; | |
} | |
public void Ack() { | |
this._model.BasicAck(this._deliveryTag, false); | |
} | |
public void Reject() { | |
this._model.BasicReject(this._deliveryTag, false); | |
} | |
public void ReTry() { | |
this._model.BasicReject(this._deliveryTag, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment