コード例 #1
0
        public SqlServiceBrokerOperation Receive(string queueName, TimeSpan?timeout = null, int?count = null)
        {
            if (timeout == null)
            {
                timeout = TimeSpan.FromSeconds(10.0);
            }

            if (count == null)
            {
                count = 1;
            }

            var messages = BrokerUtility.GetQueueMessages(_connection, _transaction, queueName, (TimeSpan)timeout, (int)count);

            _queueMessages.AddRange(messages);
            return(this);
        }
コード例 #2
0
 public SqlServiceBrokerOperation Send(string messageTypeName, byte[] bytes)
 {
     BrokerUtility.SendQueueMessage(_connection, _transaction, _conversationHandle, messageTypeName, bytes);
     return(this);
 }
コード例 #3
0
 public SqlServiceBrokerOperation EndConversation()
 {
     BrokerUtility.EndConversation(_connection, _transaction, _conversationHandle);
     return(this);
 }
コード例 #4
0
 public SqlServiceBrokerOperation BeginDialog()
 {
     _conversationHandle = BrokerUtility.BeginDialog(_connection, _transaction, _fromService, _toService, _contract);
     return(this);
 }