}
}
+ public IntPtr CursorHandle {
+ get { throw new NotImplementedException (); }
+ }
+
public void Close ()
{
if (subscription != null) {
if (subscription == null) {
IModel ch = Model;
- //ushort ticket = ch.AccessRequest ("/data");
string finalName = ch.QueueDeclare (qRef.Queue, false);
subscription = new Subscription (ch, finalName);
Subscription sub = Subscription;
return sub.Next (500, out current);
}
+
+ public bool MoveNext (TimeSpan timeout)
+ {
+ int to = MessageFactory.TimeSpanToInt32 (timeout);
+ return Subscription.Next (to, out current);
+ }
public IMessage RemoveCurrent ()
{
throw new NotSupportedException ("Unable to remove messages within a transaction");
}
+ public IMessage RemoveCurrent (TimeSpan timeout)
+ {
+ // Timeout makes no sense for this implementation, so we just work
+ // the same as the non-timeout based one.
+
+ if (current == null)
+ throw new InvalidOperationException ();
+
+ IMessage msg = CreateMessage (current);
+ Subscription.Ack (current);
+ return msg;
+ }
+
+ public IMessage RemoveCurrent (TimeSpan timeout, IMessageQueueTransaction transaction)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public IMessage RemoveCurrent (TimeSpan timeout, MessageQueueTransactionType transactionType)
+ {
+ throw new NotImplementedException ();
+ }
+
private IMessage CreateMessage (BasicDeliverEventArgs result)
{
return helper.ReadMessage (qRef, result);