コード例 #1
0
 private void OnExtensionFrame(ExtensionFrame frame)
 {
     if (frame.Payload is DotNetType)
     {
         _inboundDotNetType = ((DotNetType)frame.Payload).CreateType();
     }
     if (frame.ExtensionId == _ackExtensionId)
     {
         var ackCount = _ackReceiver.Confirm((AckFrame)frame);
         if (_messageStore != null)
         {
             _messageStore.Remove(ackCount);
             var msgsToSend = new List <object>();
             _messageStore.Peek(msgsToSend, _ackReceiver.FreeSlots);
             foreach (var o in msgsToSend)
             {
                 //TODO: We should really send a list so that SendMore() can be sued
                 _ackReceiver.Send((MessageFrame)o);
             }
         }
         if (AckReceived != null)
         {
             AckReceived((AckFrame)frame);
         }
     }
 }
コード例 #2
0
 public virtual bool Remove(Guid taskId)
 {
     return(queueStorage.Remove(taskId));
 }