Example #1
0
 /// <summary>
 /// Cut item in queue from source to another destination.
 /// </summary>
 /// <param name="source"></param>
 /// <param name="dest"></param>
 /// <param name="expiration"></param>
 /// <returns>return <see cref="QueueState"/></returns>
 /// <example>
 /// <code>
 /// //Duplicate existing item from queue to a new destination and remove the old one.
 ///public void CutItem()
 ///{
 ///    string source = "item key 2";
 ///    string dest = "item key 3";
 ///    var state = QueueApi.CutItem(source, dest, timeout);
 ///    Console.WriteLine(state);
 ///}
 /// </code>
 /// </example>
 public QueueState CutItem(string source, string dest, int expiration)
 {
     using (var message = new QueueMessage()
     {
         Command = QueueCmd.CutItem,
         Args = MessageStream.CreateArgs(KnowsArgs.Source, source, KnowsArgs.Host, dest),
         Expiration = expiration,
         IsDuplex = false,
         Key = dest
     })
     {
         return((QueueState)SendDuplex <int>(message));
     }
 }